Guest User

Untitled

a guest
Nov 21st, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. // This is for the DEFAULT 5V analog reference.
  2. // v = the voltage at the pin in Volts.
  3. // p = the pressure in bar.
  4. // Note that 'bar' is the pressure relative to the
  5. // normal atmospheric pressure at that moment.
  6. float v = (float) analogRead(A0) / 1024.0 * 5.0;
  7. float p = v / 5.0 * 100.0;"
  8.  
  9. RawVoltage = (float) analogRead(A0) - 1;
  10. float v = RawVoltage / 1024.0 * 4.0;
  11. float p = v / 5.0 * 100.0;"
Add Comment
Please, Sign In to add comment