6 years, 7 months ago.

continuously displaying real time data to TFT screen

Hello,

I have an MBED robot with two differential drive wheels (magnetic encoders) and a caster wheel.

A bit rusty with my C++ skill.

I am trying to create a code that takes the mag encode ticks and the time and integrates a position as time passes and displays to the TFT screen mounted on the robot.

I have the math kinematics down, that is not the issue, it is a matter of reading the time and ticks values using a while loop, then calculating the position and orientation angle of the robot and plotting the X, Y, Theta calculated position to the screen.

I think it is something like

while (Robot.time <.01) printf("X plot\r\n", Robot.Xplot)

else return 0;

does anyone have any examples of code or a tip?

thanks

Be the first to answer this question.