Advertisement
ossipee

Groamer

Aug 20th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. /******************************************
  2. FILE: DEMO_Track Sensor.pde
  3. PURPOSE: Track sensor test sketch for Arduino
  4. Created by Stan Lee from Iteadstuduino
  5. E-mail: Lizq@iteadstudio.com
  6. DATE: 2013/4/20
  7. *******************************************/
  8.  
  9. const int DSIGNAL = 2;
  10. const int buzzer= 3;
  11.  
  12. void setup()
  13. {
  14. pinMode(DSIGNAL, INPUT);
  15. }
  16.  
  17. void loop()
  18. {
  19. int DsignalState = digitalRead(DSIGNAL);
  20. if(DsignalState)
  21. {
  22. ¡¡¡¡digitalWrite(buzzer,LOW);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement