I used a sketch from the internet to send by RFLink one sensor value to another arduino board. It works well.But my purpose is to send multiple values, such as light, temperature, CO2-concentration, humidity etc.So I try to change the sketch for two sensorvalues, but now there are (for me) not-understandable things.

At the recievers side comes the serial data as follow:

983 9831023 0

2 lines every time.983 and 1023 (first numbers in the row) are good values. The other 2 values (983 and 0) are not known. 983 looks like a mirror of the first value. But were in the code is it going wrong.Refers it to the char [4]?

Also I don't understand the code at the end of the reciever about buflen.The int i was in the original sketch.The int j was invented by myself, because i thought there are two sensors so there must be two charMsg's.

// Null terminate the char array // This needs to be done otherwise problems will occur // when the incoming messages has less digits than the // one before. lichtCharMsg[buflen] = '\0'; co2CharMsg[buflen] = '\0';

The value read from the analog pins can be as high as 1023. To convert that to a string requires FIVE places in the array, because strings are character arrays that are NULL terminated. Your NULL, in some cases, if being written past the end of the array.

Beats you? Sorry, Seattle is to far from Holland.Means 'Beats me' the same as 'I don't know' or means it like 'stupid! Don't you see this?'Indeed i'm still a newbie. But i don't work the whole day with arduino.

Why comes in one loop two lines of serial data at the recievers side?Anyone another less painfull answer?

// Null terminate the char array // This needs to be done otherwise problems will occur // when the incoming messages has less digits than the // one before. lichtCharMsg[buflen] = '\0'; co2CharMsg[buflen] = '\0';