Skip to content

Commit

Permalink
clang-formatを通すためにwhile文を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeKato committed Sep 19, 2024
1 parent c98ea8c commit 7abe1cc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
8 changes: 6 additions & 2 deletions Arduino_Exercises/Exercise10/Exercise10.ino
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ void loop()
if (digitalRead(SW1_PIN) == LOW) {
flag = 1;
delay(30);
while (digitalRead(SW1_PIN) == LOW);
while (digitalRead(SW1_PIN) == LOW) {
// pass
}
delay(30);
}
if (digitalRead(SW2_PIN) == LOW) {
flag = 0;
delay(30);
while (digitalRead(SW2_PIN) == LOW);
while (digitalRead(SW2_PIN) == LOW) {
// pass
}
delay(30);
}
if (flag == 1) {
Expand Down
8 changes: 6 additions & 2 deletions Arduino_Exercises/Exercise19/Exercise19.ino
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ void loop()
//マーカーを検出?
if (line_signed == 1) {
if (adc_read_value(PB_0, 10) > 80) {
while (adc_read_value(PB_0, 10) > 60);
while (adc_read_value(PB_0, 10) > 60) {
// pass
}
counter++;
if (counter > 1) {
digitalWrite(LED_PIN, LOW);
Expand All @@ -132,7 +134,9 @@ void loop()
}
} else {
if (adc_read_value(PB_0, 10) < 30) {
while (adc_read_value(PB_0, 10) < 45);
while (adc_read_value(PB_0, 10) < 45) {
// pass
}
counter++;
if (counter > 1) {
digitalWrite(LED_PIN, LOW);
Expand Down
4 changes: 3 additions & 1 deletion Arduino_Exercises/Exercise6/Exercise6.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ void loop()
digitalWrite(LED_PIN, HIGH);
count++;
// delay(30);
while (digitalRead(SW1_PIN) == LOW);
while (digitalRead(SW1_PIN) == LOW) {
// pass
}
// delay(30);
} else {
digitalWrite(LED_PIN, LOW);
Expand Down
4 changes: 3 additions & 1 deletion Arduino_Exercises/Exercise7/Exercise7.ino
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ void loop()
count++;
}
delay(30);
while (digitalRead(SW1_PIN) == LOW);
while (digitalRead(SW1_PIN) == LOW) {
// pass
}
delay(30);
} else {
digitalWrite(LED_PIN, LOW);
Expand Down

0 comments on commit 7abe1cc

Please sign in to comment.