Arduino Serial Carriage Returns to Touch

Hi,

I am working on a little sensor rig to feed serial data from some pressure switches and an accelerometer to Touch over an XBEE connection. I have successfully sent stings from the Arduino to TD over the XBEE, but I am getting double carriage returns in Touch after every line using Serial.println(“mystuff”) in the Arduino. I’ve tried a couple of things to no avail.

This is likely a real C newbie question, but would anyone know how to format Serial.print or Serial.println commands in arduino that will read as a single carriage return in TD?

Thanks in advance.

  • Justin

How are you detecting the double returns? It’s possible one is a return and one is the null character.

I am using the Serial DAT to receive the serial feed. I have a simple loop running on the arduino to test:

void loop() {
Serial.println(“Hello”);
delay(1000);
Serial.println(“goodbye”);
delay(1000);
}

The result in touch shows an empty line in between each string.

You could try setting the Serial DAT format to ‘One Row Per Byte’ and see exactly which bytes are coming in.
Seems println appends \r \n as the above message suggests.
In that case you could try: Serial.print(“Hello\n”)

-Rob