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.
Fork of ACS712 by
Diff: main.cpp
- Revision:
- 5:a022ca4aaa1e
- Parent:
- 1:4f9effb20c29
--- a/main.cpp Sun Mar 13 17:29:44 2016 +0000 +++ b/main.cpp Sun Mar 13 17:47:14 2016 +0000 @@ -7,12 +7,13 @@ ACS712 dev(p18); // Connect mbed to pc's USB port Serial pc(USBTX, USBRX); + pc.printf("Sensor Log: \n\n\r"); while (1) { // Read current from sensor and output to pc terminal - pc.printf("Sensor Value: %2.2f A\n\r", dev); - wait(0.200); + pc.printf("Sensor Value: %2.2f A\n\r", float(dev)); + wait(1); } } \ No newline at end of file