I am working on the Oled (SPI) on EABaseboard with LCP1769 processor and the accelerometer(I2C).
My task is to display the x, y, z reading from the accel onto the oled screen.
I am able to display all I wanted on the screen, but there is a slight problem.
The accel reading takes up 3 spacing max on the screen.
Whenever the reading change from for eg, 159 to 19, the screen will show 199 instead of 19.
The last digit of 159 is not erased after the refresh.
It might be the issue of the definition of the variables but I can't seem to figure out the root of the problem
Please try to ignore my bad syntax or style of coding...
Thank you for your enlightenment.
Hi, Wang,
This is my suggestion, I am not sure whether it is helpful.
Can you use the line?
sprintf(display_accx,"x-axis:%3d",*xc);
you define the variable width with 3.
BR
XiangJun Rong