xdesig

Untitled

Apr 11th, 2020 (edited)
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. void grafica() {
  2.  
  3.  
  4.   Valor = 0;
  5.   for (int n = 0; n < Filtro; n++) {
  6.     Valor = Valor + analogRead(Sinal);
  7.   }
  8.   Valor = Valor / Filtro  ;
  9.   Valor =  Valor * Ampli ;
  10.  
  11.  
  12.   Valores[127] = map(Valor, 0, 1023, 63, 10); // Mapea a medida
  13.   for (int i = 0; i < 127; i++) {
  14.     Valores[i] = Valores[i + 1];
  15.     //TempoAct = millis();
  16.  
  17.     myOLED.setPixel (i, Valores[i]);
  18.     myOLED.setFont(MediumNumbers);
  19.   }
  20.  
  21.  
  22.   Pinta();
  23.  
  24. }
Add Comment
Please, Sign In to add comment