const int pins[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
int i;
void setup() {
Serial1.begin(115200);
for (int i = 0; i < 10; i++) {
pinMode(pins[i], OUTPUT);
digitalWrite(pins[i], LOW);
}
delay(5000);
Serial1.println("RASPBERRY Pi PICO RUNNING!");
while(1){
for (i = 0; i < 10; i++){
digitalWrite(pins[i], bitRead(3, i) ? HIGH : LOW);
}
delay(3000);
for (i = 0; i < 10; i++){
digitalWrite(pins[i], bitRead(5, i) ? HIGH : LOW);
}
delay(3000);
for (i = 0; i < 10; i++){
digitalWrite(pins[i], bitRead(7, i) ? HIGH : LOW);
}
delay(3000);
}
}
int counter = 0;
void loop() {
for (i = 0; i < 10; i++){
digitalWrite(pins[i], bitRead(counter, i) ? HIGH : LOW);
}
Serial1.println(counter);
counter++;
delay(3000);
}