Go Down

Topic: Atlas pH serial/terminal string repeating (Read 998 times) previous topic - next topic


Thanks for any help guys. 

Current setup:
Arduino Uno r3
Arduino IDE v1.0.1 (1.0.3 gives terrible errors)
Digole serial LCD
Dallas DS18b20

Circuit concept:  pretty simple.  UNO gets temp from sensor, sends to Atlas pH stamp for compensation, gets a (compensated) pH measurement.  Prints pH to LCD and to Serial output (currently terminal monitor, but eventually xbee radio).

What works: LCD display, temperature retrieval and conversion, sending commands to the Atlas stamp.

Problem: while LCD prints the pH result fine, the terminal monitor regularly shows the pH data as a much longer, redundant string of data.  For instance, the LCD prints the returned pH as 6.99  but the terminal monitor shows: 6.996.99
I can't figure out why the LCD never prints redundant data but the terminal regularly does.  It suggests that the Arduino has received the correct single string from the Atlas stamp, but is somehow not delivering it to the uart serial output correctly
Eventually, it's the serial/terminal output that matters more to me than the LCD.

What I've tried:
I have already tried to limit the sensorstring to (5) instead of the default (30) but that hasn't helped.
I've removed any "continuous" measurements and limited to single "r" commands or (just sending the temp).
sending multiple /r following a command to be sure it's finished with the previous command.
clearing the sensorstring before/after commands to clear any residual data
using Arduino IDE monitor under both windows and Mac environments
using Termite under windows (gets same result)

Thanks again for any advice.



One of the professional problem descriptions I've seen .
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Rather than /r you should be using \r or likely \n instead. Better yet, use serial.println and the function will take care of the newline for you.

Go Up