Pages: [1]   Go Down
Author Topic: Pduino + Arduino mega = digital inputs not working!  (Read 1255 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

Hey,
I know that it's a topic that has been talked about on a few forums, but strangely it seems that it has not been solved yet...

I have an Arduino Mega, and I am trying to make it work with Pure Data, through Pduino. For my current project I only have to get inputs, both analog (with potentiometers) and digital (switches). I did all the electronics needed (pull-up resistors, etc...), and tested it succesfully by using the in-built diode and the "all inputs" firmata example. So there seems to be no problem with my prototype.


Then comes the Pduino part: all analog inputs are working perfectly, but i failed in getting correct digital inputs. Most of the time it just refuses to react correctly, but the strange thing is that once in a while it seems to work (it reacts to the state of my switches), though with a relatively big latency, and for a short time (maybe 10 seconds or so).
In my pure data program, I did all the preliminary steps that the Pduino help file tells me to do (declare the digital inputs as inputs, then enable them).

I am using the "All Inputs" firmata program, as a beginning for the testing of my prototype (next I will limit the amount of inputs). Can it be that it's where the problem is? Do I have to change the code for it to send data through the serial port, or is Pduino taking care of that?

As I wrote at the beginning it seems that I am not the first one to have this problem, and I couldn't find any good solution online, so I am wondering if Pduino is still a valid solution to use an Arduino on pure data, or would it be a better idea to use something else?

Thanks in advance!!
« Last Edit: May 09, 2011, 05:10:09 am by edpa » Logged

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

Quote
As I wrote at the beginning it seems that I am not the first one to have this problem, and I couldn't find any good solution online, so I am wondering if Pduino is still a valid solution to use an Arduino on pure data, or would it be a better idea to use something else?
Sure, it is, for any Arduino EXCEPT the Mega. The problem is that firmata predates the Mega, and has not been updated to work with the Mega.
Logged

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

Hey, thanks for the answer!

So if i understand right, the problem is that the Firmata library won't work with the Mega... Is there an update to come in order to fix that?

I guess I have to write a firmware sending data through the serial port (something in this style: http://nf-interactive.blogspot.com/2011/02/arduino-data-to-pure-data.html), and then use the [comport] object in Pd to receive and use the data... Right...?
« Last Edit: May 09, 2011, 06:47:27 am by edpa » Logged

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

Quote
So if i understand right, the problem is that the Firmata library won't work with the Mega... Is there an update to come in order to fix that?
Parts of the Firmata library do not work with the Mega. No update that I know of.

Quote
I guess I have to write a firmware sending data through the serial port (something in this style: http://nf-interactive.blogspot.com/2011/02/arduino-data-to-pure-data.html), and then use the [comport] object in Pd to receive and use the data... Right...?
Yes. It's really not that hard to do. I'm surprised by the insistence on using Firmata that many people adhere to.
Logged

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

All right, thanks a lot for the help!
Logged

Pages: [1]   Go Up
Jump to: