Advertisement
RuiViana

Contagem

Jun 14th, 2016
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <LiquidCrystal.h>
  2. LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
  3.  
  4. int cont = 015;
  5. //--------------------------
  6. void setup()
  7. {
  8. lcd.begin(16, 2);
  9. }
  10. //--------------------------
  11. void loop()
  12. {
  13. if(cont <= 0)
  14. {
  15. cont = 015;
  16. }
  17. else
  18. {
  19. cont--;
  20. }
  21. delay(500);
  22. lcd.setCursor(1, 0);
  23. lcd.print("CONT. REGRESSIVA");
  24. lcd.setCursor(1, 1);
  25. lcd.print("TEMPO: " );
  26. lcd.print(cont);
  27. lcd.print(" ");
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement