/**
  Raspberry Pi Pico LED Bar Graph Binary Counter

  https://wokwi.com/arduino/projects/309828467927548481
  
  Copyright (C) 2021 Uri Shaked
*/

const int pins[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };

void setup() {
  for (int i = 0; i < 10; i++) {
    pinMode(pins[i], OUTPUT);
  }
}

int counter = 0;
void loop() {
  for (int i = 0; i < 10; i++) {
    digitalWrite(pins[i], bitRead(counter, i) ? HIGH : LOW);
  }
  counter++;
  delay(50);
}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT