Datasheet
IDUINO for Maker’s life
www.openplatform.cc
VCC
Power
GND
Ground
3.Example
This example show you how to use this module to catch a hit, which is different to
the shock. If you hit this module, the LED13 will light on.
The connection as below:
Example code :
******Code begin******
int Led=13;
int Shock=3;
int val;
void setup()
{
pinMode(Led,OUTPUT);
pinMode(Shock,INPUT);
}
void loop()
{
val=digitalRead(Shock);
if(val==HIGH)
{