Grove - Button

Grove - Button is a momentary push button. It contains one independent "momentary on/off" button. “Momentary” means that the button rebounds on its own after it is released. The button outputs a HIGH signal when pressed, and LOW when released. The Sig marked on silk layer stands for signal while NC stands for not used at all. There are two versions of this button available as showed in the pictures. The only difference is the direction of the Grove socket.


Product Version Changes Released Date
Grove-Button Initial Nov 25 2010


  • Easy to use momentary ON/OFF button
  • Uses Standard 4-pin Grove Cables


More details about Grove modules please refer to Grove System

Platforms Supported

Arduino Raspberry Pi BeagleBone Wio LinkIt ONE


The platforms mentioned above as supported is/are an indication of the module's hardware or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.

Getting Started

Play With Arduino


  • Step 1. Prepare the below stuffs:
Seeeduino V4.2 Base Shield Grove - Button
enter image description here enter image description here enter image description here
Get ONE Now Get ONE Now Get ONE Now
  • Step 2. Connect Grove-Button to port D2 of Grove-Base Shield.
  • Step 3. Plug Grove - Base Shield into Seeeduino.
  • Step 4. Connect Seeeduino to PC through a USB cable.


If we don't have Grove Base Shield, We also can directly connect Grove-Button to Seeeduino as below.

Seeeduino Grove-Button
5V Red
GND Black
Not Conencted White
D2 Yellow


  • Step 1. Copy the code into Arduino IDE and upload.
const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
    // initialize the LED pin as an output:
    pinMode(ledPin, OUTPUT);
    // initialize the pushbutton pin as an input:
    pinMode(buttonPin, INPUT);

void loop(){
    // read the state of the pushbutton value:
    buttonState = digitalRead(buttonPin);

    // check if the pushbutton is pressed.
    // if it is, the buttonState is HIGH:
    if (buttonState == HIGH) {
        // turn LED on:
        digitalWrite(ledPin, HIGH);
    else {
        // turn LED off:
        digitalWrite(ledPin, LOW);
  • Step 2. We will see the on board Pin13 LED on and off.

Play With Raspberry Pi


  • Step 1. Prepare the below stuffs:
Raspberry pi GrovePi_Plus Grove - Button
enter image description here enter image description here enter image description here
Get ONE Now Get ONE Now Get ONE Now
  • Step 2. Plug the GrovePi_Plus into Raspberry.
  • Step 3. Connect Grove-Button to D3 port of GrovePi_Plus.
  • Step 4. Connect the Raspberry to PC through USB cable.


  • Step 1. Follow Setting Software to configure the development environment.
  • Step 2. Git clone the Github repository.

cd ~
git clone https://github.com/DexterInd/GrovePi.git
- Step 3. Excute below commands.

cd ~/GrovePi/Software/Python
python grove_button.py

Here is the grove_button.py code.

import time
import grovepi

# Connect the Grove Button to digital port D3
button = 3


while True:

    except IOError:
        print ("Error")
  • Step 4. We will see the button on and off.
pi@raspberrypi:~/GrovePi/Software/Python $ python grove_button.py


Inspired by OVERWATCH, we have made a very cool Wooden Laser Gun toy for fun these day!

The Wooden Laser Gun and the Gun Target are all based on an Arduino board called Seeeduino Lotus. The laser emitter on the Laser Gun is controlled to fire laser pulse to "activate" the Gun Target. And there are 3 light sensors on the Gun Target to detect the laser pulse. It seems very simple right? If you are interested in our project, please make one for yourself or your child! It's worth to spend one day DIY it as a Xmas present.

Tech Support

Please do not hesitate to contact techsupport@seeed.cc if you have any technical issue. Or submit the issue into our forum.