Go Down

Topic: Sending Analog Sensor Data Between XBees (Read 847 times) previous topic - next topic

arduinoTime

#15
Jul 04, 2014, 09:42 am Last Edit: Jul 04, 2014, 09:52 am by arduinoTime Reason: 1
Sorry, I mean.. when I print it

Coordinator
Code: [Select]

float current = atof(inData);
lcd.print(current, 4); lcd.print(" mA");


It works, I promise

arduinoTime

What if I want to send multiple data? Can I do it like this?

Router
Code: [Select]

float apple = 0.75;
float pi = 3.14159;

Serial.print("<");
Serial.print(apple);
Serial.print(",");
Serial.print(pi);
Serial.print(">");


But how can I separate apple and pi in the coordinator?

wildbill

strtok or strchr are useful C string handling functions for this kind of simple parsing.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy