I have a problem since i've uploaded my code with the new 1.0 IDE to my mega 2560 Controller.
I've connected the Serial1 to the sparkfun XBee Shield so i can transfer my commands to all XBee Radios and still habe the Serial Console for debugging.
if (debug == true){
Serial1.print(value);
}
else{
Serial.write(value); //Debug-Option
}
Is debug set to true? The demo code shows it is set to false. If debug == false, Serial1 will not get any data. All output goes to Serial, not Serial1.
No idiocy there. I'm sure everyone has reversed logic at one time or the other. However, if you want to save program memory when you don't need debug, use a define instead.
cool thx for the hint - i will try it when i get my xbee running again
IDE 0.23 - I got no Problems, but in 1.0 the XBee data packets all go wrong... (i see the packet arriving at the shield and get "shot out" to the air - but on the receiver side - they don't seem to arrive...
I'm doing this as a hobby (never wrote real code befor - execpt batch and/or shell scripts - which isn't real code...).
And also as beginner I'm also enjoying to use code which i "invented" by reading books/articles/websites (like the one above) which are easy to understand (for me) - i've "planed" the optimisation of the code in later step... first the whole "thing" should work, than I can crash the "project" with optimisations.
Arrays in special are always a bit of a "nightmare" for me - i love spreadsheets but i think i can't fully understand arrays...
Hope you don't misunderstand the answer as rude...
I'm just a hobbyist, thankful for all input I can get - and yes, I will consider to use arrays in the near future