Quick-links:
6 tactile buttons arranged as 4 cursor keys and 2 action keys.
Everyone needs buttons. This board gives them to you without mess or fuss.
It's not big, it's not clever. It's a shield with 6 buttons.
We find it easy to use the cursor buttons with one hand, and the action keys with the other. If you pick the Arduino up, then the keys are easily reached with your thumbs (whichever way round you hold your Arduino).
It's very simple to use:
When a button is pressed, a digitalRead() will return LOW.
When a button is not pressed, a digitalRead() will return HIGH.
We'll make some more example sketches soon, but for the moment, here's a really simple one. It makes the Arduino's LED on D13 light whilst the button nearest the batsock logo is pressed (this button is connected to D4).
void setup() { pinMode( 4, INPUT ) ; // Set D4 to be an input digitalWrite( 4, HIGH ) ; // Turn on D4's internal pull-up resistor pinMode( 13, OUTPUT ) ; // Make D13 an output (most Arduinos have a built-in LED on D13) } void loop() { if ( digitalRead( 4 ) == LOW ) // LOW = button pressed { digitalWrite( 13, HIGH ) ; // button pressed, so turn the LED on } else { digitalWrite( 13, LOW ) ; // button not pressed, so turn the LED off } }
There is a paint sketch available on the TellyMate Shield page which was designed for use with this 6 button shield.
Parts with a B6S001 prefix:
Part# | Description | price | |
---|---|---|---|
B6S001WW | 6 Button Shield | £8.00 | Discontinued |