Guest User

Untitled

a guest
Dec 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. int led=13,button=12;
  2. void setup() {
  3. pinMode(led,OUTPUT);
  4. pinMode(button,INPUT);
  5. }
  6. void loop() {
  7. if (digitalRead(button)==HIGH)
  8. digitalWrite(led,HIGH);
  9. }
  10.  
  11. int led=13,button=12;
  12. void setup() {
  13. pinMode(led,OUTPUT);
  14. pinMode(button,INPUT);
  15. }
  16. void loop() {
  17. if (digitalRead(button)==HIGH)
  18. {
  19. digitalWrite(led,HIGH);
  20. delay(1000);
  21. digitalWrite(led,LOW);
  22. delay(1000);
  23.  
  24. } }
Add Comment
Please, Sign In to add comment