LPC1769 with EA baseboard Oled

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1769 with EA baseboard Oled

1,013 Views
e0310751
Contributor I

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

pastedImage_1.png

Please try to ignore my bad syntax or style of coding...

Thank you for your enlightenment.

Labels (2)
Tags (3)
0 Kudos
1 Reply

795 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

0 Kudos