blob: 1fb2a4a06be371a5a77fd1dba9b2a1f8600ef65c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
}
int teller = 0;
void loop() {
teller = (teller + 1) % 10;
digitalWrite(2, teller & 0b1000);
digitalWrite(3, teller & 0b0100);
digitalWrite(4, teller & 0b0010);
digitalWrite(5, teller & 0b0001);
delay(1000);
}
|