test
This commit is contained in:
@@ -52,6 +52,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (1)
|
||||
{
|
||||
printf("Button state: %d\n", digitalRead(BUTTON_PIN));
|
||||
continue;
|
||||
|
||||
if (digitalRead(BUTTON_PIN) == LOW && !buttonPressed)
|
||||
{
|
||||
printf("Button pressed\n");
|
||||
@@ -100,7 +103,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("UNpressed\n");
|
||||
buttonPressed = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user