I managed to get a value sent over from one Arduino to another using Xbees. However, there are 2 different values I need to send one after the other, for example:
if(Canbus.ecu_req(ENGINE_COOLANT_TEMP,buffer) == 1) /* Request for engine RPM */
{
Serial.print(buffer);
}
if(Canbus.ecu_req(ENGINE_RPM,buffer) == 1) /* Request for engine RPM */
{
Serial.print(buffer);
}
The two if statements are always true so long as the connections are working. What I want to do is have my receiver also identify which value is what. So I need it to know that one is temperature and the other one is RPM. I've tried by using:
Serial.print("RPM"); after Serial.print(buffer);
However, this is turned into a number itself so it could be confused from an actual RPM value itself. So i was wondering how to let my receiver identify that its an RPM or Temp without it getting the identifier confused from an actual value; what do i need to do? All help is very appreciated, thanks