Advertisement
RuiViana

vetor

Jun 7th, 2016
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. int vetor[30];
  2. int VD1 = 0;
  3.  
  4. void setup()
  5. {
  6. Serial.begin(9600);
  7. }
  8.  
  9. void loop()
  10. {
  11.  
  12. switch (vetor[21])
  13. {
  14. case 0:
  15. vetor[21] = 1;
  16. break;
  17. case 1: Serial.println(" ==> Digite o valor");
  18. while (vetor[0] == 0)
  19. {
  20. if (Serial.available() > 0)
  21. {
  22. vetor[0] = Serial.parseFloat();
  23. }
  24. }
  25. VD1 = vetor[0];
  26. Serial.print( VD1);
  27. Serial.println(" Segundo(s) ");
  28. break;
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement