StandardFirmata on Due

Is it possible to get StandardFirmata running on the DUE? ( from Download - Firmata )

What are the steps to get this running?


It won't even run correctly on a Mega.

What are the steps to get this running?

Put the palms of your hands together, close your eyes and repeat after me
Our farther ....

I apologize if that was a silly question, I really don't know what the process for this.

I hope someone will write a new version of it so it works on the ARM DUE

And I hope they don't.
There is little point having a processor as powerful as the Due and then throwing away all that power.
Why do you want such a stupid thing?


Be nice :slight_smile: they guy is just asking a question.
Let's not scare away the users :slight_smile:

Did you try running it? what errors do you get?
In general a question like "does X run on the Due" would receive a no answer at the moment because we haven't had the time to check everything people use with arduino


I probably would have put it differently, but I have to agree with Mike.

Personally, I feel that until there is some sign that the authors are visibly interested in supporting Firmata, it should be removed from the Arduino IDE distribution. I have been a member here for a bit over a year, and in that time, I have never seen a reply to a Firmata issue from anyone that appeared to be related to the Firmata project.

I think that Firmata is still useful on the uno for a lot of applications. It's not perfect but there isn't a better replacement avaiable right now with the same amount support libraries.

Paul Stoffregen, for example, did a lot of work to maintain firmata so it's not "abandoned" it's just an open source project that benefits from the contributions of whoever is interested in it.


The point is that when you use Firmata you degrade an Arduino Uno to the status of a dumb peripheral. You throw away all the intelligence and all of the hard real time reaction you can get from an Arduino. Having said that it does have its place, an arduino, a laptop and Firmata gives you the sort of system offered by the Raspberry Pi, only with analogue inputs and more than one PWM output.

However, now you have produced a beautiful beautiful machine capable of running like the wind and some one wants to reduce it to the same level as a crippled Arduino Uno. I can not see any advantage in running Firmata on a Due in fact I see it more as a crime. It won't run any faster as it is governed by the speed of the serial port.

Would you take a Ferrari and deliver milk in it?
Would you take a thoroughbred stallion and use it to give donkey rides on a beach?

Sorry but I am passionate on this one. :slight_smile:

Sometimes it is handy to be able to switch i/o's using Firmata.
Like to check connected hardware is working okay.

Actually, updating Firmata is on my to-do list... roughly in the middle, below lots of urgent stuff for Teensy 3.0, but well above lots of low priority bugs and stuff. I'm planning to add Due and Teensy 3.0 definitions, and also work on making it truly compatible with alternate Stream-based ports. I want to merge the recent stepper support that's currently in a separate branch.

This probably won't happen in time for 1.0.2 (unless someone else does it... which seems unlikely). At the moment, I have 2 Dues on order from Mouser, but they haven't arrived yet. The only Due hardware I have is the early developer beta. If Mouser doesn't ship in a couple weeks, I'll probably just use the beta hardware for testing. I'll probably only connect a few LEDs and pushbuttons. If anyone is willing to test with more stuff connected to lots of pins, please get on the Firmata developer mail list.

As to whether Firmata is a "waste" of good hardware, if it lets people get their projects working, then I believe it's valuable.

That would be fantastic, I would help test it for sure!


Maybe you're feeling extra grumpy, but how can you ignore all the folk who occasionally want an easy way to test their board, often because the 'super fast many-interrupt native app' they're trying to get going isn't quite there yet? Anyone ever thought they've bricked a board?

I think we need more ways to test kit and help beginners to develop their confidence, not fewer.


Well, as a first try, here is the DUE info I put into Boards.h after moving the Firmata folder into the DUE's libraries folder. StandardFirmata wouldn't build because it needs Servo.h (and probably more), but SimpleDigitalFirmata compiled and loaded on to the DUE, and I was able to use the processing Sketchbook/blink/blink.pde to blink the LED (pin 13) on the DUE.

 // Arduino DUE
#elif defined(__SAM3X8E__)
#define TOTAL_ANALOG_PINS       12
#define TOTAL_PINS              66 // 54 digital + 12 analog
#define VERSION_BLINK_PIN       13
#define IS_PIN_DIGITAL(p)       ((p) >= 2 && (p) < TOTAL_PINS)
#define IS_PIN_ANALOG(p)        ((p) >= 54 && (p) < TOTAL_PINS)
#define IS_PIN_PWM(p)           digitalPinHasPWM(p)
#define IS_PIN_SERVO(p)         ((p) >= 2 && (p) - 2 < MAX_SERVOS)
#define IS_PIN_I2C(p)           ((p) == 20 || (p) == 21) // 70 71
#define PIN_TO_DIGITAL(p)       (p)
#define PIN_TO_ANALOG(p)        ((p) - 54)
#define PIN_TO_PWM(p)           PIN_TO_DIGITAL(p)
#define PIN_TO_SERVO(p)         ((p) - 2)

Yes, mantoui!

But I can't test using program, becouse window is empty. Only Arduino IDE shows greating string.

And after copying of "Servo" directory from "arm" folder into "sam" folder, when I compile StandardFirmata I get:

/opt/arduino-1.5.1/hardware/arduino/sam/libraries/Servo/Servo.cpp:45: fatal error: avr/interrupt.h: No such file or directory
compilation terminated.

So, we need interrupt.h for sam (Arduino Due) :wink:


But I can't test using program, becouse window is empty.

In the screenshot you posted, notice there are 2 menus at the top, "File" and "Port". Try using "Port" to select the serial port. Of course, close the Arduino Serial Monitor before you open the port with firmata_test.

Perhaps the Due built StandardFirmata isn't sending the proper capability data for firmata_test to detect the number of pins and their capabilities?

I've uploaded a couple builds of firmata_test for Ubuntu 12.04, one with the logging window enabled. Perhaps if you try that, it may give some more info about what's wrong. If you don't see the log, try moving the main window. It might be underneath. The log window has a menu that lets you save all the info to a file, to make it easier to share the results.

The only documentation on firmata_test is its source code. To see what those log messages mean, look for the printf() statements!

Thank You for help, Paul!

... after start of firmata_test.64bit:

(firmata_test.64bit:6147): GLib-GObject-WARNING **: invalid uninstantiatable type (null)' in cast to GtkRadioMenuItem'
(firmata_test.64bit:6147): Gtk-CRITICAL **: gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

after start of firmata_test.64bit_2 or firmata_test.64bit_2_log from

/lib/ version `GLIBC_2.15' not found (required by firmata_test.64bit_2)

my glibc on debian stable is 2.11.3 .

attached output of from .
attached output of make after installation of libwxgtk2.8-dev .

output.txt (6.6 KB)

make.txt (19.3 KB)

Would you take a Ferrari and deliver milk in it?


--- bill

firmata_test only works with StandardFirmata.
Servo.h must be removed from StandardFirmata.ino. After the corrections it will be able to compile in Arduino IDE 1.5.1.
Then firmata_test began to show controls with Due board.

I think (this is just my guess) that firmata_test need to devote more time to get a list of the initial capabilities to show all controls without missing Pins. Increasing the value of SamplingInterval not helping for Due.

StandardFirmataWOservo.ino (20.8 KB)

Firmata will probably work better on Due when 1.5.2 is released, with Servo and lots of other improvements.