Advertisement
RuiViana

Teste

May 4th, 2016
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. int vetor[25];
  2. //----------------------------
  3. void setup()
  4. {
  5. Serial.begin(9600);
  6. vetor[13] = 0;
  7. Serial.println("--- SELECIONE O TIPO DE PAINEL CONTADOR DE TEMPO ---");
  8. }
  9.  
  10. //--------------------------
  11. void loop()
  12. {
  13. Serial.println("--- SELECIONE O TIPO DE PAINEL CONTADOR DE TEMPO ---");
  14. Serial.println(" 1 <=> GRADATIVO");
  15. //Serial.println(" 2 <=> REGRESSIVO");
  16. Serial.println(" 3 <=> NENHUM");
  17. Serial.print("DIGITE A OPCAO: ");
  18.  
  19. while (vetor[13] == 0)
  20. {
  21. if (Serial.available() > 0)
  22. {
  23. vetor[13] = Serial.read();
  24. }
  25. }
  26. Serial.print (vetor[13]);
  27.  
  28. switch (vetor[13])
  29. {
  30. case 1: Serial.println(" ==> GRADATIVO");
  31. break;
  32. case 2: Serial.println(" ==> REGRESSIVO");
  33. break;
  34. case 0: Serial.println(" ==> NENHUM");
  35. break;
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement