aboutsummaryrefslogtreecommitdiff
path: root/libraries/Esplora/Esplora.cpp
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-01-06 18:38:03 +0100
committerCristian Maglie <c.maglie@bug.st>2013-01-06 18:38:03 +0100
commitc01bc2b62f76a5d417e5ed13dcb0c047a4f67224 (patch)
tree4703fc452282756f3c40d38f9d41b1a28e0bf0f6 /libraries/Esplora/Esplora.cpp
parent5f4e55a3d274838388696c3f8130b0f2dc40daf7 (diff)
Merged upcoming 1.0.4 and updated revision log
Diffstat (limited to 'libraries/Esplora/Esplora.cpp')
-rw-r--r--libraries/Esplora/Esplora.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libraries/Esplora/Esplora.cpp b/libraries/Esplora/Esplora.cpp
index 83df0d7..29c9e19 100644
--- a/libraries/Esplora/Esplora.cpp
+++ b/libraries/Esplora/Esplora.cpp
@@ -111,6 +111,15 @@ boolean _Esplora::readButton(byte ch) {
return (val > 512) ? HIGH : LOW;
}
+boolean _Esplora::readJoystickButton() {
+ if (readChannel(CH_JOYSTICK_SW) == 1023) {
+ return HIGH;
+ } else if (readChannel(CH_JOYSTICK_SW) == 0) {
+ return LOW;
+ }
+}
+
+
void _Esplora::writeRGB(byte r, byte g, byte b) {
writeRed(r);
writeGreen(g);