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
Fork of Lab2 by
Diff: main.cpp
- Revision:
- 1:9fe22ab77011
- Parent:
- 0:9439aa91d4cb
- Child:
- 2:b641c02f2844
--- a/main.cpp Tue Feb 06 10:34:11 2018 +0000 +++ b/main.cpp Sat Mar 03 01:07:04 2018 +0000 @@ -129,8 +129,10 @@ } else { - pc.printf("Voltag is %f\n\r", volt); - my_output.write_u16(volt*19720); + float adjust = (0x7FFF/2)+(0x7FFF/10); + + pc.printf("Voltage is %f\n\r", volt); + my_output.write_u16(volt*adjust); pc.printf("Voltage changed\n\r"); } }