Step 2. Connect Grove - Buzzer to port D3 of Base Shield.
Step 3. Connect Grove - Button to port D2 of Base Shield.
Step 4. Plug Base Shield into Seeeduino.
Step 5. Connect Seeeduino to PC through a USB cable.
Software
Step 1. Copy below code to Arduino IDE and upload to Seeeduino.
const int button = 2; // connect a button
const int buzzer = 3; // connect a buzzer
void setup()
{
pinMode(button, INPUT); //set button as an INPUT device
pinMode(buzzer, OUTPUT); //set LED as an OUTPUT device
}
void loop()
{
int btn = digitalRead(button); //read the status of the button
digitalWrite(buzzer, btn);
delay(10);
}
Step 2. Press the button and w e w ill hear the buzzer.
FAQ
Please click
to see all Base Shield V2 FAQs.
Resources
[PDF]
[Eagle ]