1
12
13#define led1 = 13
14#define in1 = 12
15#define in2 = 11
16#define in3 = 10
17#define in4 = 9
18
19void setup() {
20 Serial.begin(9600);
21 pinMode(9, OUTPUT);
22 pinMode(10, OUTPUT);
23 pinMode(11, OUTPUT);
24 pinMode(12, OUTPUT);
25 pinMode(13, OUTPUT);
26}
27
28void loop() {
29 if (Serial.available() > 0) {
30 char inputvalue = char(Serial.read());
31 if (inputvalue == 'F') {
32 digitalWrite(12, HIGH);
33 digitalWrite(11, LOW);
34 digitalWrite(10, HIGH);
35 digitalWrite(9, LOW);
36 }
37 else if (inputvalue == 'B') {
38 digitalWrite(12, LOW);
39 digitalWrite(11, HIGH);
40 digitalWrite(10, LOW);
41 digitalWrite(9, HIGH);
42 }
43
44 else if (inputvalue == 'R') {
45 digitalWrite(12, LOW);
46 digitalWrite(11, LOW);
47 digitalWrite(10, HIGH);
48 digitalWrite(9, LOW);
49 }
50
51 else if (inputvalue == 'L') {
52 digitalWrite(12, HIGH);
53 digitalWrite(11, LOW);
54 digitalWrite(10, LOW);
55 digitalWrite(9, LOW);
56 }
57
58 else if (inputvalue == 'C') {
59 digitalWrite(12, LOW);
60 digitalWrite(11, HIGH);
61 digitalWrite(10, HIGH);
62 digitalWrite(9, LOW);
63 }
64
65 else if (inputvalue == 'A') {
66 digitalWrite(12, HIGH);
67 digitalWrite(11, LOW);
68 digitalWrite(10, LOW);
69 digitalWrite(9, HIGH);
70 }
71
72 else if (inputvalue == 'O') {
73 digitalWrite(13, HIGH);
74 }
75
76 else if (inputvalue == 's') {
77 digitalWrite(13, LOW);
78 }
79
80 else if (inputvalue == 'S') {
81 digitalWrite(12, LOW);
82 digitalWrite(11, LOW);
83 digitalWrite(10, LOW);
84 digitalWrite(9, LOW);
85 }
86 }
87}