mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Added Esplora readJoystickButton function to be consistent with Esplora readButton
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user