Problems with Arduino IDE 1.0 and my Xbee project

Hello Everyone,

so I had my project perfectly working with Arduino IDE 0.23, but now after updating to IDE 1.0, nothing works >:(...I made the changes the explain the website, like adding Arduino.h in my library, and Serial.write not using BYTE anymore (I use this to send my data through my xbee, so I used to have Serial.write(data, BYTE), and now I have Serial.write(data) after they removed BYTE). Compilation goes well and I upload my program into the Arduino FIOs, but nothing works at all. I do not want to loose my time debugging lines of code since I need to finish this project soon that it is actually my thesis! I am just hoping someone run into the same issue and maybe found a solution. This info explains the changes in the Serial class, but I guess I am using Serial in the correct way now...I dont quite get what they mean with the behavior of the Serial.print, but I made the change...I am thinking that this might be the issue here....

  • Serial transmission is now asynchronous - that is, calls to
    Serial.print(), etc. add data to an outgoing buffer which is transmitted
    in the background. Also, the Serial.flush() command has been repurposed
    to wait for outgoing data to be transmitted, rather than dropping
    received incoming data.

  • The behavior of Serial.print() on a byte has been changed to align it
    with the other numeric data types. In particular, it will now print
    the digits of its argument as separate ASCII digits (e.g. '1', '2', '3')
    rather than a single byte. The BYTE keyword has been removed. To send a
    single byte of data, use Serial.write() (which is present in Arduino 0022
    as well).

Thank you!
Alex

Would you mind showing your code?

First hint: If you use API-mode and want to transfer packets:

OLD: Serial.print(0xFF, BYTE) - NEW: Serial.write(0xFF)

BUT:

OLD: (0x00, BYTE) - NEW: Serial.write((byte)0x00).

This casting thing should have been avoided in 1.0. Unfortunately it wasn't fixed.

For starters only :wink:

markbee

That's exactly what I do, except for the casting when 0x00...I will try that then! thank you very much...I will post code later if I dont fix error. That's a weird thing for the casting, do you know why that happens???

Cheers!

That's a question for the developers of Arduino 1.0 :wink:

Maybe it will get fixed in one of the next releases.

markbee

AlexNemesis:
so I had my project perfectly working with Arduino IDE 0.23 but now after updating to IDE 1.0, nothing works.
...
I do not want to loose my time debugging lines of code since I need to finish this project soon that it is actually my thesis!

Given that, I am curious why you want to upgrade to 1.0?
Why not continue using 0022 or 0023 until there is a better time to deal with
all the 1.0 headaches?

--- bill