Arduino Example Snippet
#define SWITCH_PIN 14
void setup() {
Serial.begin(9600);
pinMode(SWITCH_PIN, INPUT);
}
void loop() {
int switchValue = digitalRead(SWITCH_PIN);
if (switchValue == HIGH) {
Serial.println("SHAKING !!!");
} else {
Serial.println("Still...");
}
delay(5);
}
