Hi
I am making a game controller and game. The game controller uses and accelerometer to detect motion and orientation of the users hand to control the movement of a spaceship. The data is then sent using bluetooth to a computer. So far so good all is up and running.
To display the graphics I was planning to just use the extended ASCII table and have a terminal emulator repeatedly print the characters that I send, clearing the screen with the form feed control character, then printing the characters again. The problem is the emulator seems to be really slow at printing the characters. With each new print slowly being printed onto the screen like someone is typing.
Is there any hack to accomplish what I want?
I've tried ZOC, cool term, putty and hyper terminal emulators and they all have the same results
Cheers
Pedro
What baud rate are you using? For some reason, a lot of people get stuck using 9600.
Go have a look at processing.org. That's the PC side that Arduino was made to complement.
Hi,
I tried playing around with the baud rate but it made absolutely no difference, currently running at 115200, my guess is the delay is caused by the terminal emulator, buffering maybe ?
I'll take a look at processing
thanks
pedro_delmonde:
Hi,
I tried playing around with the baud rate but it made absolutely no difference, currently running at 115200, my guess is the delay is caused by the terminal emulator, buffering maybe ?
Or any delays in your code, Arduino serial output gets serviced when loop() is done before the next loop() runs. Blocking code blocks serial too.
I'll take a look at processing
thanks
It will let you do pixel graphics.
With ASCII text graphics one thing to do is only erase and write the chars you want to change. Wiping and rewriting whole screens is never going to be smooth. Best you can get will be kind of strobe-like.
Hi Again,
There are a few delays in there for reading the I2C registers of the accelerometer, but I checked this by removing the accelerometer and just printing and clearing to the terminal screen through bluetooth, same results. I'd guess there are a few delays in the softwareSerial library but I've not checked yet.
I didn't think you could delete old characters already printed to the terminal screen?.... 
How do you navigate to the character you need to remove?
Record the position of the character before you calculate the next move (oldX, oldY). Calculate the next move, print a spaces at the old position and the character at the newly calculated position.
Back when I did write for ANSI terminals (PuTTY emulates VT-100 is a choice) I used cursor control characters for small moves and escape sequences to position the cursor at row and column positions. You will have to dig into settings but that will show you things about how the emulator works, what to avoid and what is advantage.
Additional: Look into the ASCII table, screen clear is formfeed (FF) and bell/beep (BEL) is char 7.
All of these can be embedded into strings you print or done through printing in routines.
@GroundFungus
I get where we record the co-ordinates, I meant more as in how do I navigate back to that co-ordinate? Is it just using the back space key?
@GoForSmoke,
Thanks, I've jut doe a little testing using the VT-100 commands and it seems to work well.
Cheers
Pedro