Guest User

Untitled

a guest
May 25th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. void setup() {
  2. Serial.begin(9600);
  3. pinMode(7, OUTPUT);
  4. }
  5.  
  6. void loop() {
  7. int sensorValue = analogRead(A0);
  8. if (sensorValue > 50)
  9. {
  10. digitalWrite(7, HIGH);
  11. Serial.println("Rumble on");
  12. delay(1000);
  13. }
  14. else
  15. {
  16. digitalWrite(7, LOW);
  17. Serial.println("Rumble off");
  18. delay(100);
  19. }
  20. }
Add Comment
Please, Sign In to add comment