-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkraddy_android.ino
92 lines (72 loc) · 1.32 KB
/
kraddy_android.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
void o (int i,int f=0,int b=0,int c=0,int g=0, int h=0, int m=0,int y=0)
{
int a[8] = {
i,f,b,c,g,h,m,y };
for (int z=0 ; z<8 ; z++)
{
switch(a[z])
{
case 1:
digitalWrite(relay_1,HIGH);
break;
case 2:
digitalWrite(relay_2,HIGH);
break;
case 3:
digitalWrite(relay_3,HIGH);
break;
case 4:
digitalWrite(relay_4,HIGH);
break;
case 5:
digitalWrite(relay_5,HIGH);
break;
case 6:
digitalWrite(relay_6,HIGH);
break;
case 7:
digitalWrite(relay_7,HIGH);
break;
case 8:
digitalWrite(relay_8,HIGH);
break;
default :
break;
}
}
}
void f (int i,int f=0,int b=0,int c=0,int g=0, int h=0, int m=0,int y=0)
{
int a[8] = {
i,f,b,c,g,h,m,y };
for (int z=0 ; z<8 ; z++)
{
switch(a[z])
{
case 1:
digitalWrite(relay_1,LOW);
break;
case 2:
digitalWrite(relay_2,LOW);
break;
case 3:
digitalWrite(relay_3,LOW);
break;
case 4:
digitalWrite(relay_4,LOW);
break;
case 5:
digitalWrite(relay_5,LOW);
break;
case 6:
digitalWrite(relay_6,LOW);
break;
case 7:
digitalWrite(relay_7,LOW);
break;
case 8:
digitalWrite(relay_8,LOW);
break;
}
}
}