hey
i've made a little robot that is controlled via xbee using the maple r5 and as well as the serialx.read() problems identified in http://forums.leaflabs.com/topic.php?id=1174 i have also discovered an error in the documentation for char.
-------------------------------------------------------------------------
loop(){
char cmd = serialx.read()
.......
}
does not block but iterates through the whole buffer, meaning the data recieved from the xbee is repeatedly read every minute or so, it just mostly reads out empty bytes.
while(serialx.available==0);
fixes it, but it took me a long time to work out what the issue was.
-------------------------------------------------------------------------
In the language reference, it says that char is a signed byte and "unsigned char" is the unsigned version, but unless "signed char" is used it is in fact unsigned. took me a while to work that out too, but should be fairly easy to fix.
t