Seeed Grove Manual

Seeed Grove Manual

5-way switch
Hide thumbs Also See for Grove:

Advertisement

Quick Links

3/24/2019
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.
With only one small switch to meet all your needs for switch control!
http://wiki.seeedstudio.com/Grove-5-Way_Switch/
Grove - 5-Way Switch - Seeed Wiki
 
1/12

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Grove and is the answer not in the manual?

Questions and answers

Summary of Contents for Seeed Grove

  • 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.
  • Page 2: Speci Cation

    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...
  • Page 3: Platforms Supported

    3/24/2019 Grove - 5-Way Switch - Seeed Wiki Platforms Supported http://wiki.seeedstudio.com/Grove-5-Way_Switch/ 3/12...
  • Page 4: Getting Started

    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 8 3/24/2019 Grove - 5-Way Switch - Seeed Wiki Serial.println("***** Device probe OK *****"); (PID_VAL(mswitch->getDevID()) == PID_5_WAY_TACTILE_SWITCH) Serial.println("Grove 5-Way Tactile Switch Inserted!"); key_names = grove_5way_tactile_keys; else if (PID_VAL(mswitch->getDevID()) == PID_6_POS_DIP_SWITC Serial.println("Grove 6-Position DIP Switch Inserted!"); key_names = grove_6pos_dip_switch_keys; // enable event detection mswitch->setEventMode(true);...
  • 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...
  • Page 12: Tech Support

    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...

Table of Contents