Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michal Rybka
openCanSat-2.0-library
Commits
c29bca77
Commit
c29bca77
authored
Sep 25, 2018
by
Markéta Jedličková
Browse files
Funkcionality for buttons added
parent
dd21c33e
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/2-PRO-version-examples/baseStationPRO/baseStationPRO.ino
View file @
c29bca77
...
...
@@ -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()
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment