Serial read/ display project.

Hey all,

I'm working on a project for the IEEE club at my college, basically we have an electric van that we want to modify to enter into the toyota green grand prix in Watkins Glenn, NY. right now it only has a spyglass display that cycles through a bunch of data (motor speed, controller current, battery voltage, etc.) but in order to collect better data, on whats going on we need to make a display that shows all these parameters at once. Our motor controller sends out serial data (9600 baud) so basically heres what I want to do:

Each communication starts with ":s" it's ASCII code 8 bits, 1 stop bit, no parity

It gives a parameter an example would be "motor temp" again, ASCII 8 bits, 1 stop bit, no parity

and then a value, same coding.

I want to display the parameter name permanently on a TFT screen, and every time the value for a certain parameter comes up it would refresh the value next to the parameter name on the display.

what I'm having trouble with is:

-syntax for the arduino code

-configuring the serial data to read as 7bits ASCII and 1 stop bit

any advice on how you would go about coding this is much appreciated!

CoryB1730:
...
...
Each communication starts with ":s" it's ASCII code 8 bits, 1 stop bit, no parity
...
...
-configuring the serial data to read as 7bits ASCII and 1 stop bit

I'm probably missing something; please explain this 8-bit versus 7-bit.

To change the hardware serial parameters to 7N1

  Serial.begin(9600, SERIAL_7N1);

I assume the "7bit" was a typo?

The number of stop bits is meaningful only to the sender, where 2 stop bits increase the delay between two characters.

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example.

If the examples are not exactly what you need they should not require much modification.

Have you the option to change the format of the data sent from the motor controller? Sending long identifiers such as "Motor temp" is very inefficient, both for sending and for parsing.

...R