lyre liu / Mbed 2 deprecated project1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lyreliu
Date:
Tue Mar 08 08:13:18 2016 +0000
Parent:
8:120355a81f73
Child:
10:0457bb95d21e
Commit message:
praogram;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Mar 08 08:05:20 2016 +0000
+++ b/main.cpp	Tue Mar 08 08:13:18 2016 +0000
@@ -54,15 +54,20 @@
 
 void SerialTransmit(void)
 {   
-    unsigned char start,end;
+    unsigned char start,end,test1,test2;
     start = 0xfe;
     end   = 0xff;
+    test1 = '%';
+    test2 = '$';
     if(mass>3)
         mass =3;
-    mass_trans_low = (unsigned char)(mass*10000);
-    mass_trans_high = (unsigned char)(mass*10000)>>8;
+    //mass_trans_low = (unsigned char)(mass*10000);
+    //mass_trans_high = (unsigned char)(mass*10000)>>8;
+    
     pc.printf("%u",start);
-    pc.printf("%u",mass_trans_high);
-    pc.printf("%u",mass_trans_low);
+    //pc.printf("%u",mass_trans_high);
+    //pc.printf("%u",mass_trans_low);
+    pc.printf("%u",test1);
+    pc.printf("%u",test2);
     pc.printf("%u",end);
 }
\ No newline at end of file