Little Bird
Mini Dual Button Unit
Description Dual Button, as its namesake, has two buttons with different color. If the Button unit is not enough, how about double it up to a pair. They s...
Description
Dual Button, as its namesake, has two buttons with different color. If the Button unit is not enough, how about double it up to a pair. They share the exact same mechanism, button status can be detected by the input pin status,simply capture the high/low electrical level.
This unit communicates with M5Core through GROVE B port.
Output status:
Product Features
- Program Platform: Arduino, UIFlow(Blockly,Python)
- Two Lego-compatible holes
Kit includes
- 1x Dual BUTTON Unit
- 1x Grove Cable
Application
- Game Controller
- Remote control switch
Documents
Example
1. Arduino IDE
The code below is incomplete(just for usage). TO get the complete code, please click here.
#include <M5Stack.h> // declaration int cur_value_red = 0; int cur_value_blue = 0; // initialization M5.begin(); pinMode(26, INPUT);// Red Button Pin setting pinMode(36, INPUT);// Blue Button Pin setting // read data cur_value_red = digitalRead(26); cur_value_blue = digitalRead(36); M5.update(); 2. UIFlow
To get the complete code, please click here.
More information
Schematic
PinMap
M5Core (GROVE B)GPIO36GPIO265VGNDDUAL_BUTTON UnitBlue Button PinRed Button Pin5VGNDJargon buster
Plain-language definitions for the technical terms used above.
- Grove
- Grove is a plug-in connector ecosystem for sensors and modules that avoids soldering and jumper wires. Grove compatibility matters because it can make it quicker to add supported I2C devices, as long as the cable and voltage are suitable.
- IDE
- Short for Integrated Development Environment, a program used to write, run and manage code. It matters because some learners prefer a traditional coding workspace instead of a guided notebook-style lesson.
Find this product in
Components
Related Tutorials
Free guides on learn.littlebird.com.au


