
LCD Accelerometer with interrupt fault
Precision.cpp
- Committer:
- Aubs
- Date:
- 2010-05-12
- Revision:
- 0:298e8a54dc2d
File content as of revision 0:298e8a54dc2d:
#include "header.h" extern float X; extern float Y; extern float Z; extern float xout; extern float yout; extern float zout; // Precision Mode void Precise(void){ lcd.cls(); while(1){ SigCon(); lcd.locate(1,1); lcd.printf("X="); lcd.printf("%.2f",X); //print to screen lcd.locate(1,3); lcd.printf("Y="); lcd.printf("%.2f",Y); lcd.locate(1,5); lcd.printf("Z="); lcd.printf("%.2f",Z); //only for testing lcd.locate(1,7); lcd.printf("%.2f" ,xout); // help with fine tuning by showing accelerations lcd.locate(1,9); lcd.printf("%.2f" ,yout); lcd.locate(1,11); lcd.printf("%.2f" ,zout); //dont know why but out by factor of 10 wait_ms(5); but3.fall(&menuscreen); } }