Page 1
Grove - 5-Way Switch The Grove - 5-Way Switch can be used to detect the switch position and event like single click/double click/long press, etc. It can detect left/right/up/down/center 5 directions. The 5-way switch will be a great option for multifunction control.
3/24/2019 Grove - 5-Way Switch - Seeed Wiki [https://www.seeedstudio.com/Grove-5- Way-Switch-p-3136.html] Features 5 way individual switch Good heat resistance Long operating Life Grove compatible Speci cation Item Value Operating voltage 3.3V / 5V Interface Default I C Address 0x03 Applications Game control...
3/24/2019 Grove - 5-Way Switch - Seeed Wiki Arduino Raspberry Pi BeagleBone LinkIt ONE Caution The platforms mentioned above as supported is/are an indication of the module's software or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases.
Page 5
4 wires inside, the 2 wires cable can't transfer data. If you are not sure about the wire you have, you can click here [https://www.seeedstudio.com/Micro-USB-Cable-48cm-p- 1475.html] to buy 2 Each Grove module comes with a Grove cable when you buy. In case you lose the Grove cable, you can click here [https://www.seeedstudio.com/Grove-Universal-4-Pin-Buckled-20cm- Cable-%285-PCs-pack%29-p-936.html] to buy.
Page 6
3/24/2019 Grove - 5-Way Switch - Seeed Wiki Seeeduino Grove - 5-Way Switch Black White Yellow Software Attention If this is the rst time you work with Arduino, we strongly recommend you to see Getting Started with Arduino [http://wiki.seeedstudio.com/Getting_Started_with_Arduino/] before the start.
Page 7
3/24/2019 Grove - 5-Way Switch - Seeed Wiki Or, you can just click the icon in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. #include "Grove_Multi_Switch.h" GroveMultiSwitch mswitch[1];...
Page 9
3/24/2019 Grove - 5-Way Switch - Seeed Wiki // dynamic device probe deviceDetect(); delay(1000); return; (!(evt->event & GroveMultiSwitch::BTN_EV_HAS_EVENT)) { #if 0 Serial.print("No event, errno = "); Serial.println(mswitch->errno); #endif return; (int i = 0; i < mswitch->getSwitchCount(); i++) { Serial.print(key_names[i]); Serial.print(": RAW - ");...
Page 10
3/24/2019 Grove - 5-Way Switch - Seeed Wiki Serial.print("LEVEL-CHANGED "); Serial.println(""); Step 4. Upload the demo. If you do not know how to upload the code, please check How to upload code [http://wiki.seeedstudio.com/Upload_Code/]. Step 5. Open the Serial Monitor of Arduino IDE by click Tool-> Serial Monitor.
Page 11
3/24/2019 Grove - 5-Way Switch - Seeed Wiki KEY A: EVENT - LEVEL-CHANGED KEY A: RAW - HIGH RELEASED KEY B: RAW - HIGH RELEASED KEY C: RAW - HIGH RELEASED KEY D: RAW - HIGH RELEASED KEY E: RAW - HIGH RELEASED...
3/24/2019 Grove - 5-Way Switch - Seeed Wiki Tech Support Please do not hesitate to submit the issue into our forum [https://forum.seeedstudio.com/]. http://wiki.seeedstudio.com/Grove-5-Way_Switch/ 12/12...
Need help?
Do you have a question about the Grove and is the answer not in the manual?
Questions and answers