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 12:623f562fc3db, committed 2016-03-08
- Comitter:
- lyreliu
- Date:
- Tue Mar 08 14:01:32 2016 +0000
- Parent:
- 11:261f1ba05668
- Child:
- 13:8db371de14a7
- Commit message:
- program test;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 08 13:46:42 2016 +0000 +++ b/main.cpp Tue Mar 08 14:01:32 2016 +0000 @@ -56,7 +56,7 @@ void SerialTransmit(void) { - unsigned char start,end,voltage_high,voltage_low; + unsigned char start,end,voltage_high,voltage_low,voltage_test; start = 0xfe; end = 0xff; @@ -65,6 +65,7 @@ mass =3; mass_trans_low = (unsigned char)(mass*10000); mass_trans_high = (unsigned char)(mass*10000)>>8; + voltage_test = (unsigned char)voltage_measure*10; voltage_high = (unsigned char)(voltage_measure*10000)>>8; voltage_low = (unsigned char)(voltage_measure*10000); @@ -72,7 +73,7 @@ pc.printf("%c",start); //pc.printf("%c",mass_trans_high); //pc.printf("%c",mass_trans_low); - pc.printf("%c",voltage_high); - pc.printf("%c",voltage_low); + pc.printf("%c",voltage_test); + //pc.printf("%c",voltage_low); pc.printf("%c",end); } \ No newline at end of file