varli_ketanpl

SMI_LAB7_FCT_CALCUL_TEMP

Nov 13th, 2023
872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. float GetTemp1(void) {
  2.     float wADC;
  3.     float rezultat;
  4.     float aux;
  5.  
  6.     wADC = analogRead(1);
  7.     aux = wADC * (5.0 / 1023.0);  
  8.     rezultat = (aux - 0.5) / 0.01;
  9.  
  10.     return (rezultat);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment