I am working on a project where i have an arduino as a coordinator for multiple arduino with xbee routers. I am using the xbee library for API communication.
I need to send different messages to the xbee routers and i need to create a function to create my ZBTxRequest because i have a lot of messages and i dont want to declare all of them.
my function is like this:
ZBTxRequest ZBTx (XBeeAddress64 x, char y, char t) {
uint8_t z[2];
z[0] = y;
z[1] = t;
ZBTxRequest s = ZBTxRequest (x,z,sizeof(z));
return s;
}
and i call it in the loop like this:
xbee.send(ZBTx(jola1,'a','1'));
jola1 beeing a XBeeAddress64
the error i receive is "no matching function for call to 'XBee::send(ZBTxRequest)"
what am i doing wrong? the creation of the function or the way i call it?
My problem is that i dont receive the values i want.
That's certainly a shame. Perhaps if you posted ALL of your sender code, and ALL of the receiver code, and an example of what is sent and an example of what is received, we might be able to help you.