lyre liu / Mbed 2 deprecated project1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lyreliu
Date:
Tue Mar 08 14:54:04 2016 +0000
Parent:
14:b67ce99ccd48
Child:
16:3cf10425a0f1
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 14:44:19 2016 +0000
+++ b/main.cpp	Tue Mar 08 14:54:04 2016 +0000
@@ -57,8 +57,8 @@
 void SerialTransmit(void)
 {   
     unsigned char start,end,voltage_high,voltage_low,voltage_test;
-    start = 0xfe;
-    end   = 0xff;
+    start = '#';
+    end   = '$';
 
 
     if(mass>3)
@@ -67,8 +67,8 @@
     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);
+    voltage_high = (unsigned int)(voltage_measure*10000)>>8;
+    voltage_low  = (unsigned int)(voltage_measure*10000);
     
     pc.printf("%c",start);
     //pc.printf("%c",mass_trans_high);