Commit c29bca77 authored by Markéta Jedličková's avatar Markéta Jedličková
Browse files

Funkcionality for buttons added

parent dd21c33e
......@@ -99,6 +99,14 @@ void loop()
int button2 = digitalRead(BUTTON_2);
int button3 = digitalRead(BUTTON_3);
if(button3 == LOW and screenNum == 0)
{
screenNum = 1;
ocsDesign.drawHomescreen();
delay(300);
Serial.println("Button 3 ");
}
if(button1 == LOW and screenNum == 1)
{
screenNum = 0;
......@@ -123,6 +131,14 @@ void loop()
Serial.println("Button 3 ");
}
if(button1 == LOW and screenNum == 2)
{
screenNum = 1;
ocsDesign.drawHomescreen();
delay(300);
Serial.println("Button 1 ");
}
if (radio.receiveDone()) // Got one!
{
Serial.println("Message received: " + String(income.messageId));
......@@ -133,4 +149,3 @@ void loop()
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment