Advertisement
ossipee

Groamer

Aug 20th, 2014
361
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. DATE: 2013/4/20
  6. *******************************************/
  7.  
  8. const int DSIGNAL = 2;
  9. const int buzzer= 3;
  10.  
  11. void setup()
  12. {
  13. pinMode(DSIGNAL, INPUT);
  14. }
  15.  
  16. void loop()
  17. {
  18. int DsignalState = digitalRead(DSIGNAL);
  19. if(DsignalState)
  20. {
  21. ¡¡¡¡digitalWrite(buzzer,LOW);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement