projects
/
miniband.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Update README.md
[miniband.git]
/
arduino
/
maracas.ino
1
int newState;
2
int states[] = {-1,-1};
3
const int wait = 500;
4
5
void setup() {
6
Serial.begin(9600);
7
}
8
void loop() {
9
for (int i = 0; i < 3; i+=2) {
10
newState = digitalRead(i);
11
if (newState != states[i]) {
12
Serial.print(i);
13
Serial.print(",1023");
14
Serial.println();
15
states[i] = newState;
16
delay(wait);
17
}
18
}
19
}