Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Repository for the 2015 OhmBoyZ Capstone group.
Revision 8:b127541c9149, committed 2015-12-01
- Comitter:
- davidcerrone
- Date:
- Tue Dec 01 18:26:11 2015 +0000
- Parent:
- 7:405e3ff6cbcd
- Commit message:
- Changed to mV measure
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Nov 28 20:55:25 2015 +0000 +++ b/main.cpp Tue Dec 01 18:26:11 2015 +0000 @@ -13,7 +13,7 @@ meas = analog_value.read(); // Converts and read the analog input value (value from 0.0 to 1.0) meas = meas * 3300; // Change the value to be in the 0 to 3300 range (currently to mV) printf("meas = %fmV\n\r",meas); // Print out raw measurement in terms of mV - b=((meas-1.65)/(4.0*12.2*100.0)); // Based on equation 1 + b=((meas-1650)/(4.0*12.2*100.0)); // Based on equation 1 //VVOUT [V] = B × G × RSHUNT × GAMP = B [mT] × 12.2 mA/mT × RSHUNT [Ω] × 4 [V/V] //0 Tesla is VDD/2 // 12.2 mA/mT @@ -26,6 +26,6 @@ else { led = 0; } - wait(1.5); // wait 1 second + wait(1); // wait 1 second } }