test 4D7S + HC-SR04 + NUCLEO-F103RB
Dependencies: ArduinoFB SRF05 mbed
Diff: main.cpp
- Revision:
- 1:0f0f31f25bbd
- Parent:
- 0:fac6c6a73e5f
--- a/main.cpp Thu Feb 12 10:26:36 2015 +0000
+++ b/main.cpp Thu Feb 12 12:42:42 2015 +0000
@@ -55,13 +55,7 @@
float val;
val=srf*100;
- /*
- unsigned char t=((val%1000)/100);
-
- disbuff[0]= (unsigned char)(val/1000);
- disbuff[1]= (unsigned char)((val%1000)/100);
- disbuff[2]= (unsigned char)((val%100)/10);
- */
+
disbuff[0]= (unsigned char)(val/1000);
disbuff[1]= (val/100)-disbuff[0]*10;
disbuff[2]= (val/10)-(disbuff[0]*100+disbuff[1]*10);
frederic blanc