Speed Display

I finally got a program that will record and calculate scale speed in mph of two model trains. The only problem is displaying this. I can do it through the serial monitor yes but I can’t seem to get it to where it just changes one value. So here is what it does now:

Train A 2mph
Train B 0mph
Train B 11mph
Train B 1mph
Train B 22mph
Train B 27mph
Train B 31mph
Train B 30mph
Train B 118mph
Train B 22mph
Train B 26mph
Train B 29mph
Train A 0mph
Train A 23mph
Train A 29mph
Train A 22mph

Something of that sort. I want it to just stay

Train A Xmph
Train B Ymph

and simply change the X and Y variables and not scroll down every time. I wonder if there is any software or any way I could do this.

testingr5.ino (8.92 KB)

There is a library that allows you to send ANSI escape sequences to the serial port. If the device on the other end recognizes, and reacts properly to, the ANSI escape sequences, then you can do what you want (if you send the correct escape sequences).

It’s google time.

Google, here I come ;)

Thanks.

I think that may be too complicated for the time I have to get it done. Any other ideas?

Any other ideas?

Use an LCD where overwriting text is the norm. Or, write your own application for the PC to display the serial data.