Marco Zecchini
/
Esempio_read_analog
Analog in example
Revision 1:b1e1b7ad742f, committed 2019-02-28
- Comitter:
- marcozecchini
- Date:
- Thu Feb 28 10:20:33 2019 +0000
- Parent:
- 0:f2fd41e16884
- Commit message:
- Reference to 5v
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f2fd41e16884 -r b1e1b7ad742f main.cpp --- a/main.cpp Sat Feb 23 11:58:27 2019 +0000 +++ b/main.cpp Thu Feb 28 10:20:33 2019 +0000 @@ -13,7 +13,7 @@ while(1) { meas_r = analog_value.read(); // Read the analog input value (value from 0.0 to 1.0 = full ADC conversion range) - meas_v = meas_r * 3300; // Converts value in the 0V-3.3V range + meas_v = meas_r * 5000; // Converts value in the 0V-5V range // Display values printf("measure = %f = %.0f mV\n", meas_r, meas_v);