Pages: [1] 2   Go Down
Author Topic: StandardFirmata on Due  (Read 4247 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it possible to get StandardFirmata running on the DUE? ( from http://www.firmata.org/wiki/Download )

What are the steps to get this running?

Thanks
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It won't even run correctly on a Mega.

Quote
What are the steps to get this running?
Put the palms of your hands together, close your eyes and repeat after me
Our farther ....
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

 
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Forum Administrator
Offline Offline
God Member
*****
Karma: 47
Posts: 629
I find plain exciting
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Grumpy_Mike

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

@datastorm
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

m

Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 19
Posts: 3114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Forum Administrator
Offline Offline
God Member
*****
Karma: 47
Posts: 629
I find plain exciting
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

m
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley
Logged

NZ
Offline Offline
Jr. Member
**
Karma: 1
Posts: 84
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
God Member
*****
Karma: 24
Posts: 587
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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.


Logged

Brighton, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 47
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Grumpy_Mike

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.

BW
Jim
« Last Edit: October 31, 2012, 01:14:55 pm by jgmdavies » Logged

Offline Offline
Jr. Member
**
Karma: 9
Posts: 75
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  

Code:
// 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)

« Last Edit: December 14, 2012, 08:06:59 pm by mantoui » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, mantoui!

But I can't test using http://www.pjrc.com/teensy/firmata_test/firmata_test.64bit 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)  smiley-wink


* Screenshot-Firmata Test.png (11.9 KB, 411x667 - viewed 20 times.)

* Screenshot--dev-ttyACM0.png (13.65 KB, 598x321 - viewed 19 times.)
« Last Edit: December 15, 2012, 09:34:49 am by Valdas » Logged

0
Offline Offline
God Member
*****
Karma: 24
Posts: 587
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

But I can't test using http://www.pjrc.com/teensy/firmata_test/firmata_test.64bit 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.
Logged

Pages: [1] 2   Go Up
Jump to: