organizing better
This commit is contained in:
@@ -57,14 +57,6 @@ int main(int argc, char *argv[])
|
||||
printf("Button pressed\n");
|
||||
ledState = (ledState + 1) % NUM_LEDS;
|
||||
buttonPressed = true;
|
||||
delay(100);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("UNpressed\n");
|
||||
buttonPressed = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
printf("LED state: %d\n", ledState);
|
||||
|
||||
@@ -103,6 +95,15 @@ int main(int argc, char *argv[])
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
delay(500);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("UNpressed\n");
|
||||
buttonPressed = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user