-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.ino
56 lines (37 loc) · 880 Bytes
/
debug.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
int sled=-1;
int sled12=-1;
void debugToggleSled(){
if(sled==1){
digitalWrite(13, HIGH);
}else{
digitalWrite(13, LOW);
}
sled=sled*-1;
}
void debugToggleSled12(){
if(sled12==1){
digitalWrite(12, HIGH);
}else{
digitalWrite(12, LOW);
}
sled12=sled12*-1;
}
int ledp1=1;
int ledp2=0;
int ledp3=0;
int ledpd=1;
void debugLedPattern(){
if(ledp1==1){digitalWrite(12,HIGH);}else{digitalWrite(12,LOW);}
if(ledp2==1){digitalWrite(13,HIGH);}else{digitalWrite(13,LOW);}
if(ledp3==1){digitalWrite(11,HIGH);}else{digitalWrite(11,LOW);}
if(ledpd==1){
if(ledp1==1){ledp1=0;ledp2=1;return;}
if(ledp2==1){ledp2=0;ledp3=1;ledpd=-1;return;}
return;
}
if(ledpd==-1){
if(ledp3==1){ledp3=0;ledp2=1;return;}
if(ledp2==1){ledp2=0;ledp1=1;ledpd=1;return;}
return;
}
}