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