Go Down

Topic: Sending Analog Sensor Data Between XBees (Read 1 time) 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