Pages: [1]   Go Down
Author Topic: Firmata 2.1 (version C)  (Read 1118 times)
0 Members and 1 Guest are viewing this topic.
Canada
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
I Love Arduino!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I was having a lot of problems with Firmata. The major one being with improper versioning of the whole system.

I use Firmata with Max/Msp, Pure Data and Processing, but the different versions of Firmata either had different names, different baud rates or different proctocol versions (even the Firmata official website has documentation for version 2.1 but only distributes version 2.0).

I made the following zip to include my own version of the standard_firmata (based on version 2.1) for:
  • Arduino
  • Processing
  • Max/Msp
I corrected a lot of bugs in all three versions, added servo and sysex support and unified the names (they are all called Firmata).

Get it here:
 http://interaction.danslchamp.org/index.php?n=Arduino.Firmata
Logged

Thomas Ouellet Fredericks

Enschede - The Netherlands
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Seems to work ok. The only problem is that 2.1 in Arduino has a serial speed of 57600 Baud and this 2.1 version has a higher speed ( 115200 ).
Logged

Canada
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
I Love Arduino!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually Firmata in Arduino can be any speed (the speed is determined with Firmata.begin() ).

It is specifically because of the problem that you note that I included my own version of the standard firmata.
Logged

Thomas Ouellet Fredericks

Canada
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
I Love Arduino!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you go on Firmata.org, the version of Firmata for Processing and Max/Msp all expect a baud rate of 115200 NOT 57600 as in Firmata 2.1 presently included with Arduino.
Logged

Thomas Ouellet Fredericks

Brooklyn, NY, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 115
arduino for all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


The StandardFirmata in 0017 turned out to be kind of buggy, unfortunately.  We have things mostly fixed in SVN, but would love to have more testing and bug reports!  So here's a new release.  I fixed all bugs that I knew about, including the one where analog pins sometimes acted like they had a log curve on them.

http://at.or.at/hans/pd/objects.html#pduino

I tested this on a Diecimila, I hear there are troubles with the Arduino Pro and others, but I only have the older ones, so testing and bug reports on those are very helpful. Tof, could you make an official release of the Processing Firmata stuff?  Its currently floating without a maintainer.

.hc


Logged

Minneapolis, MN USA
Offline Offline
Full Member
***
Karma: 2
Posts: 162
Never catch a falling soldering iron...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The Firmata trunk seems to be broken again.  The most recent change (revision 37) to StandardFirmata.pde broke analog input.  SVN comment was  "fixed bug in setting pin to ANALOG mode, fixed by TOF"

This causes an infinite loop I think.
setPinModeCallback(14, mode) will call
reportAnalogCallback(0, mode) which will then call
setPinModeCallback(14, mode)...

infinite loop?  I don't quite understand why this change was made when things were already working -- the fix for the logarithmic potentiometer behavior was good.  I was scratching my head when observing that logarithmic behavior.  I thought my pot was broken...

« Last Edit: October 17, 2009, 09:56:25 am by mkrumpus » Logged

Canada
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
I Love Arduino!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I do not know about the svn version to which I have made no contributions myself. But my version (linked at the top of this thread) does not loop infinitely.
Logged

Thomas Ouellet Fredericks

Brooklyn, NY, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 115
arduino for all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Michael Krumpus for spotting that bug, that one was my fault, not tof's. :-[  Here's an updated release:

http://at.or.at/hans/pd/objects.html#pduino
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Still not working for me with Duemilanove and Arduino 0017; same problems yet: I get either 0 or 1 values with the sensor, while without the serial communication -in the ARduino IDE Serial Monitor- I get the normal temperature values
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49372
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How about posting your processing code, then? You might be making a simple mistake in the code. We could have a look, and maybe save some of your hair.

Although, hair's overrated.
Logged

Pages: [1]   Go Up
Jump to: