3 axis accel
Dependencies: MMA8451Q SLCD_minus_mod mbed
Fork of ACC_LCD_341_Basic by
Diff: acc_341.cpp
- Revision:
- 5:29c6ba524263
- Parent:
- 4:1d559bac561a
- Child:
- 6:0f05e120b749
diff -r 1d559bac561a -r 29c6ba524263 acc_341.cpp --- a/acc_341.cpp Sun Nov 06 23:56:18 2016 +0000 +++ b/acc_341.cpp Mon Nov 14 15:50:33 2016 +0000 @@ -44,8 +44,8 @@ } void LCDsignedFloat(float theNumber){ - sprintf (lcdData,"%3.2f",theNumber); - if (theNumber < 0.0) sprintf (lcdData,">%3.2f",fabs(theNumber)); + sprintf (lcdData," %3.2f",theNumber); + if (theNumber < 0.0) sprintf (lcdData,"<%3.2f",fabs(theNumber)); LCDMess(lcdData); } @@ -76,7 +76,7 @@ pc.printf("zAcc = %f\r\n", zAcc); #endif - LCDsignedFloat(zAcc); + LCDsignedFloat(xAcc); // Wait then do the whole thing again. } }