aboutsummaryrefslogtreecommitdiff
path: root/libraries/Esplora/Esplora.cpp
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-01-27 12:52:06 +0100
committerCristian Maglie <c.maglie@bug.st>2013-01-27 12:52:06 +0100
commit76d436f51501bd47ff463b88a196f517191f58ad (patch)
tree1f22ba2385ad22eca306d67793c0827451f2b50a /libraries/Esplora/Esplora.cpp
parentbb9cc4f70c17eed497ab30d7bfe6eebb35055205 (diff)
parentc6287dd6ac33544179a6544b8f3f55a396ec6608 (diff)
Merge branch 'ide-1.5.x' into can
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);