Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. void LED_UPDATE(int state)
  2. {
  3.  
  4. int count; // initialized to zero, once program runs it automatically enter state ==1
  5. if (state == 1)
  6. {
  7.  
  8. digitalWrite(RED_PIN, LOW);
  9. digitalWrite(GREEN_PIN, HIGH);
  10. count=0;
  11. }
  12. else if (state == 2)
  13. {
  14. count+=1;
  15. Red_Blink();
  16.  
  17. if(count == 1 )
  18. {
  19. sms.SendSMS("086XXXXXXX", "PANIC BUTTON PRESSED, Subject needs help!!!");
  20. }
  21.  
  22. }
  23.  
  24. static int count; // initialized to zero, once.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement