Arduino Second ServiceAugust 19, 2016 posted by: robotanton
From now on: Firmata Second Service.
Good news everyone, from now on you’re getting a brand new set of nodes able to talk to your loaded-with-firmata Arduino Boards:
- ArduinoUno (Devices)
- ArduinoLeonardo (Devices)
- ArduinoMega (Devices)
- ArduinoLilyPad (Devices)
- ArduinoDue (Devices)
- ArduinoYun (Devices)
Together with jens.a.euser (author of the original Arduino (Devices StandardFirmata 2.x)node ) we’ve looked for a more convenient, easier and faster way to patch Arduino related ahhmm… patches.
With this implementation:
- Just plug a DigitalWrite (Firmata), AnalogWrite (Firmata) or ServoWrite (Firmata) node to the Arduino node (or concatenate them together) to set the pins of the Board.
- Connect DigitalRead (Firmata) and AnalogRead (Firmata) nodes to get the values from the Board’s pins.
- Use the Sysex Messagespin output to receive different ‘Sysex Messages’ sent back by the Arduino Board. Some Sysex decoders are already there (see StringDecoder (Firmata), CapabilityDecoder (Firmata)). Sending custom ‘Sysex Messages’ is easy as well.
- Your board is not listed in the NodeBrowser? The Arduino nodes are easily adaptable for other controllers running Firmata. Hello teensy…
Easier than ever before:
- no need to supply a spread for all 20 pins and then SetSlice some of them to particular values.
- no need to define the ‘PinMode’ for each pin.
- no need to define which pins should report their values back.
Hardware for the development was kindly provided by QUADRATURE.
p.s. Oh, by the way, these new Arduino nodes are fully implemented in VL.
p.p.s. And of course there are some caveats.
- The Cons (Firmata) has only 5 input pins which are interleaved with ‘BinSize’ pins. But note that you can cons multiple cons nodes… (for now)
- The VL nodes eat more processor ticks as their C# counterparts. Working on it…
The nodes are now available in Alpha Builds.
Comments are no longer accepted for this post.
Cool, nice to see this live at last.
Paul Stoffregen hints at some limitations in the Known Issues section, namely with PWM and servo usage. Is this something you’ve encountered, too?
Also, if you like to port some more powerful Arduinos, I can send you an older Teensy, for newer ones you need to apply ;)
Regarding the listed limitations of the Firmata Protocol:
The new Arduino nodes are using Extended Analog feature of the Firmata for accessing PWM pins beyond pin 15.
It looks like that the Servo problem on the pins higher than 11 (or 15) is also resolved by this Extended Analog feature. What we don’t have at the moment is the “SERVO_CONFIG” message. And the servos on these higher pins are not tested.
Older Teensy are welcome! Or just copy the ArduinoUno and its BoardConfig, rename it and adjust the BoardConfig. Should work.
I maintain the Arduino Firmata protocol and implementation. I have a couple of questions for this group.
I’d like to add a link to the Firmata readme to add the VVVV Firmata client. It’s not clear from this post what the correct link is.
I’m curious why the user has to choose a specific board. If you use Firmata the capability query, you can determine the configuration of the board (of course this adds a couple of hundred milliseconds to the startup). However, this will support a much wider range of boards, including all of the Teensy boards (except the new 3.5 and 3.6), and even non-AVR boards such as SAM and SAMD boards and the PIC-based ChipKit boards.
Indeed, we’ve used the Capability Query from the beginning to automagically determine the configuration. But the problem is that not all Firmata implementations support this Query. Unfortunately. As far as I know the Teensy implementation don’t answer to this Query (correct me if I’m wrong).
With our current approach everybody can just copy one of the Arduino nodes (and its internal BoardConfig module) and adjust the BoardConfig to (any) Board’s specs.
I guess that this blogpost is the best link at the moment. Thank you!
Teensy boards work with the version of Firmata included with the Arduino IDE (Firmata v2.5.3). They support all of the same features as any of the Arduino boards, including new features such as the ability to control serial peripherals via hardware or software serial. The Boards.h file lists all of the boards and architectures currently supported by Firmata. I think there is some confusion created by the fragmentation of Firmata. There were many forks years ago and many users keep using these old forks rather than the “official” version (that you get with the IDE / library manager). For example, there is no need to use the version of Firmata that Paul maintains for Teensy boards as that is based on an older fork of Firmata. I try to keep the official version up-to-date with new hardware as it becomes available.
My main concern was that the following list in the initial post in this thread was very limited in terms of the range of boards and architectures the Firmata actually supports:
thank you for your info, very interesting! Yes, I’m also one of “those” users checking for the Firmata for Teensy at the pjrc.com. Hope the situation about the “official” version will be more clear in the near future.
But still there are many custom and stripped Firmatas out there, which are not responding to all possible Requests.
I guess in addition we’ll make one “Generic” module for the boards loaded with the official Firmata.
For sure, our current set of Arduino nodes is limited. We’ve had only these boards for testing and there is so many hardware in the wild. Our approach was to make it modular and customizable, so everyone can adapt these modules to the special boards they have.
Thank you for your effort keeping Firmata up-to-date with the new hardware!
what do you think if we provide ONE generic Firmata (Devices) node which will work with all boards loaded with the “Official” Firmata (which is answering to the Capability request).
We then remove all Arduino nodes.
@jens.a.e, please comment.
Thank you, Anton
can I connect output of DigitalRead to switch inputs of position for ServoWrite? Idea is when someone push the button servo will change the position. Pushbutton is working and I can read the output with DigitalRead, but I can connect it with switch for ServoWrite. Servo is also working but I can’t to connect them together.
many thanks Petr
Sorry, I am late to the party…
Could we move this into the forums please :) I don’t get notifications from the website, but from there.
@soundanalogous thx for raising the concern and linking the VVVV implentation; I did add it years ago on the wiki (pre-github-days for Firmata), but it somehow vanished.
The nice thing with Cons is, that you can maintain the order of the resulting spread, and it’s visually clear.
If you allowed multiple input connections, the order would be either arbitrary, or depending on the order of drawing the connections (or maybe basedon the X position of the source nodes ;) )
there was an arduino firmata 1.0 plugin with built in serial communication, made by me, for quite some time in the addon pack. i started working on 2.0 with jens together and handed it over to him..
this would make this one the “third service” ;)
How time flies! :)