Datasheet
IDUINO for Maker’s life
www.openplatform.cc
{
shockVal = digitalRead (shockPin) ; // read the value from our sensor
if (shockVal == LOW) // If we're in an alarm state
{
lastShockTime = millis(); // record the time of the shock
if (!bAlarm){
Serial.println("IDUINO Shock module");
bAlarm = true;
}
}
else
{
if( (millis()-lastShockTime) > shockAlarmTime && bAlarm){
Serial.println("no alarm");
bAlarm = false;
}
}
}
******Code End******