質問編集履歴
1
fixed
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
A, B, Cの順に3種類のモードに切り替えたいのですが、以下のコードでCまで行ってAまで戻れない理由がわかりません。
|
6
4
|
|
7
5
|
|
8
6
|
|
@@ -12,27 +10,27 @@
|
|
12
10
|
|
13
11
|
```Arduino
|
14
12
|
|
15
|
-
switch_mode = "
|
13
|
+
switch_mode = "A";
|
16
14
|
|
17
15
|
|
18
16
|
|
19
17
|
void loop (){
|
20
18
|
|
21
|
-
if(switch_mode == "
|
19
|
+
if(switch_mode == "A"){
|
22
20
|
|
23
|
-
switch_mode = "
|
21
|
+
switch_mode = "B";
|
24
22
|
|
25
23
|
}
|
26
24
|
|
27
|
-
else if(switch_mode = "
|
25
|
+
else if(switch_mode = "B"){
|
28
26
|
|
29
|
-
switch_mode = "
|
27
|
+
switch_mode = "C";
|
30
28
|
|
31
29
|
}
|
32
30
|
|
33
|
-
else if(switch_mode = "
|
31
|
+
else if(switch_mode = "C"){
|
34
32
|
|
35
|
-
switch_mode = "
|
33
|
+
switch_mode = "A";
|
36
34
|
|
37
35
|
}
|
38
36
|
|