File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ writeBlue KEYWORD2
2828readRed KEYWORD2
2929readGreen KEYWORD2
3030readBlue KEYWORD2
31+ readTinkerkitInput KEYWORD2
32+ readTinkerkitInputA KEYWORD2
33+ readTinkerkitInputB KEYWORD2
3134tone KEYWORD2
3235noTone KEYWORD2
3336
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ const byte CH_SLIDER = 4;
4040const byte CH_LIGHT = 5 ;
4141const byte CH_TEMPERATURE = 6 ;
4242const byte CH_MIC = 7 ;
43+ const byte CH_TINKERKIT_A = 8 ;
44+ const byte CH_TINKERKIT_B = 9 ;
4345const byte CH_JOYSTICK_SW = 10 ;
4446const byte CH_JOYSTICK_X = 11 ;
4547const byte CH_JOYSTICK_Y = 12 ;
@@ -156,6 +158,16 @@ class _Esplora {
156158 void tone (unsigned int freq);
157159 void tone (unsigned int freq, unsigned long duration);
158160 void noTone ();
161+
162+ inline unsigned int readTinkerkitInput (byte whichInput) {
163+ return readChannel (whichInput + CH_TINKERKIT_A);
164+ }
165+ inline unsigned int readTinkerkitInputA () {
166+ return readChannel (CH_TINKERKIT_A);
167+ }
168+ inline unsigned int readTinkerkitInputB () {
169+ return readChannel (CH_TINKERKIT_B);
170+ }
159171};
160172
161173
You can’t perform that action at this time.
0 commit comments