Arduino version for Firmata - Known Issue?

First difficulty in setting up Arduino for Pachube - The standard firmata sketch will not upload using Arduino 0012 (the latest version). Actually, it will not compile, displaying a timer0_overflow_count.

I found this post from someone who had the same problem:

http://misusage.org/wordpress/?cat=9

and tried their solution - drop back to Arduino 0009. This worked. But there will be advantages to using the latest version.

Until this is fixed, please make a note on all Arduino pages that version 0009 must be used.

If there is a workaround, could someone post it and note it in tutorials?

Thanks!

Re: Arduino version for Firmata - Known Issue?

which Arduino (i.e. hardware) are you using? (the post linked to says "I'm using one of the earlier Arduinos").

arduino diecimila + standard firmata + Arduino 11 together work ok, but i haven't tried Arduino 12 yet (which i seem to remember had firmata included by default -- need to check that out).

Re: Arduino version for Firmata - Known Issue?

Firmata was included by default in Arduino 12, and there were some changes to the timer handling in Arduino 12 (so that millis() wraps round after 49 days rather than 9 hours).

I'm still on Arduino 11 myself, and haven't used Firmata, but maybe you're trying to use an old version of Firmata? The timer0_overflow_count sounds remarkably like something that would be affected by changes to when millis() overflows.

You say that you're using the "standard firmata sketch" - which one is that exactly? Looking at the source code repository for Arduino, it seems that there were a few tweaks to the Firmata code when it was included in Arduino 12, mostly replacing the timer0_overflow_count code with calls to millis().

So, I think that if you use the relevant Firmata sketch that's in hardware/libraries/Firmata of the Arduino release then it will work.

Re: Arduino version for Firmata - Known Issue?

Great, thanks. That's what I get for blindly following instructions.

Please make a note in the tutorials that Arduino users of version 12 and later need not download Firmata, just go in the menu to Sketchbook/Examples/Library-Firmata/StandardFirmata (there are other sketches there as well, but the standard sketch works well with Pachube). I suspect many Arduino users are hobbyist just-follow-the-recipe tinkerers like me (until we learn how to cook) and need a little more clarification.

That said, I appreciate the effort that has gone into the tutorials and support, managed to go live with Pachube in one sitting last night, and look forward to learning more.

Re: Arduino version for Firmata - Known Issue?

Glad you got it working. I'm sure Usman will be along soon to update the tutorials; I'm just a fellow user who's been playing with Arduino for a while (and lurking on the Arduino developers mailing list :-)

What are you planning on connecting the Arduino up to? I'm curious.

Re: Arduino version for Firmata - Known Issue?

Ultimate goal is a building management system (Xbees, Arduinos), which Usman is also interested in. Right now I have a Danger shield on the Arduino that I need to re-route a bit, since two sliders are in the places that Pachube is seeing light and temperature. OK for testing. And it worked OK last night.

But now that I find the Arduino version 12 Firmata and successfully load it to the Arduino, I am getting readings of zero. Tried to drop back to Arduino 009 again, but can't find the combination that worked last night. Hmmm... back to the troubleshooting. I know Pachube is getting it alright - XML has updated to zero, Pachube shows zero. Now something in my Arduino. It's a learning experience :)

Re: Arduino version for Firmata - Known Issue?

Update for any other Arduinoids pulling their hair out - is it just me? I went back to Arduino 009 (known to work from last night, I will try version 11 at some point) and loaded the StandardFirmata sketch from the download page - http://at.or.at/hans/pd/Standard_Firmata_334.zip - after trying the built-in Firmata in Version 12 with no luck. That download page sketch works now, in version 009, using the Processing sketch for manual upload (suitably edited) from the bottom of the Pachuino page http://community.pachube.com/?q=node/13 .

Re: Arduino version for Firmata - Known Issue?

when getting 0s but no errors using processing with an arduino/firmata, i've found that it's often because of one of two reasons:
either:
1. the serial rate is different in arduino/firmata and processing (old firmata defaulted to 57600; there was talk about changing default to 115200 - scroll down the arduino sketch to the setup loop and make sure it matches the processing setup loop's rate)
or
2. the wrong serial device is selected in setup (i.e. where you're choosing serial.list()[0] or [1] or [2] etc.)

Re: Arduino version for Firmata - Known Issue?

Thanks Uh - I'll check both possibilities. I've embedded graphs in my website, so I am moving ahead. http://www.gomaya.com/glyph/

Re: Arduino version for Firmata - Known Issue?

ok, so i've tried out various possible combinations and i'm happy to say that, so far, all of them have worked: all combinations of

- Arduino 11 or Arduino 12 (11 with Standard Firmata that you can download, and 12 with Standard Firmata from the built-in examples)

plus

- Arduino NG or Arduino Diecimila (i.e. the hardware itself)

plus

- Processing 135 to 157 and Processing 1.0.1

The only thing to be wary of, if you are using Arduino 12 (the software) is that the Firmata library defaults to 115200, so in Processing you need to make sure that your arduino is setup like this: " arduino = new Arduino(this, Arduino.list()[0], 115200);" (otherwise you get the issue that C4C_Dave is getting above with Processing only seeing '0' for any data coming in -- basically it can't read it).

i'll make sure this is all clear in the tutorials.

Re: Arduino version for Firmata - Known Issue?

Same here, I got it only partially working with version 09. Using the _included_ firmata in 12 as mentioned above works perfectly. Thanks for pointing this out!