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.
Revision 26:e0f46da1ff13, committed 2019-08-21
- Comitter:
- HeptaSatTraining2019
- Date:
- Wed Aug 21 18:29:15 2019 +0000
- Parent:
- 25:4277e16b97c3
- Commit message:
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Aug 21 18:14:40 2019 +0000
+++ b/main.cpp Wed Aug 21 18:29:15 2019 +0000
@@ -7,10 +7,13 @@
int main()
{
pc.baud(9600);
- float bt;
+ float bt_dec;
+ char bt_hex[4];
for(int i = 0; i < 10; i++) {
- eps.vol(&bt);
- pc.printf("Vol = %f\r\n",bt);
+ eps.vol(&bt_dec);
+ eps.vol_u16(bt_hex);
+ pc.printf("Vol = %f\r\n",bt_dec);
+ pc.printf("Vol_hex = %c%c%c%c\r\n",bt_hex[0],bt_hex[1],bt_hex[2],bt_hex[3]);
wait(1.0);
}
}
\ No newline at end of file