Pages: [1]   Go Down
Author Topic: pduino [arduino] object in puredata  (Read 2007 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
I love YaBB 1G - SP1!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yesterday hans c steiner made public in the pd list the fimware for the arduino that will allow us users to change stuff directly from pd smiley

here it is:
http://at.or.at/hans/pd/objects.html


im openning this thread to see if anyone shares here knowledge and uses since im just beginning to play and learn what can be done with the "bicho"


tchuss!

/a
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Cool.  I added a link in the Arduino playground PD section: http://www.arduino.cc/playground/Interfacing/PD

Now, we just need to implement Java/Processing/Flash classes for interfacing with the same firmware.  
Logged

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

Quote
Now, we just need to implement Java/Processing/Flash classes for interfacing with the same firmware.

Yes, yes! I'll gladly help out anyone who is interested in making objects for other environments.  Plus, I am sure that the firmware could be improved, if anyone wants to take that on.  For example, implementing the pulseIn control.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 134
panta rei resist the resistors!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll copy here for everybody the discussion we had via e-mail
in Flash it can be a lot more complicated, but not impossible.

I didn't understand how pd handles the incoming data
how do you register an object in pd to a specific imput from Arduino?
how do you do something like this
val1 = analogRead(pin5)
val2 = digitalRead(pin6)

you wrote in the e-mail
Quote
To start read data from Arduino, you wait for the cycle marker byte:  255.  Then you are at the top of the cycle.  The next byte is digital  pins 0-6, then digital pins 7-14.  Then comes byte pairs for each  analogIn, which are reassembled to make the 10-bit value.  To send  digital data to Arduino, its just a 3 byte cycle, 255 for the marker,  one by for digital pins 0-6 and the next byte for pins 7-13.

I can understand if you serialize the data coming from Arduino
so that Arduino sends a long "string" or byte-cycle like
255   0 0 0 0 0 0   0 0 0 0 0 0    ?-? ?-? ?-? ?-? ?-?
where
- 255 is the starting cycle marker
- 6 bytes for digital pin 1->6
- 6 bytes for digital pin 7->14
- 5 pairs(?-?) what do they look like (I have to test it yet)

in this case is a bit easyer
there is only one object that listens to the incoming data and then dispatches the different information
to whoever is listening...or they simply pull the data from the dataset...
it could create some asyncronous computation but I'm not sure
I fear that it can be a mess to code for the user...but i'll give it a try

in the end of the day it would be great to code in Actionscript something like
// read analog value
val = Arduino.pin0.value
//set digital value
Arduino.pin6.value = HI;
//set action
Arduino.pin9.pulseTo(someValue)

in fact the pulsing could be handled internally by Flash with no problems and just sending single digitalWrites at the specified rate..that could be really cool...and doing FFT inside flash  :o  8-)

What I fear is that the architecture would ask the user to code more or less the same things inside Flash that he would do in Arduino...I can see almost no point in that

it could be great if you could explain on the wiki a bit better the "string" that has to be SENT TO Arduino to set commands and the "string" that is RECEIVED FROM Arduino..
give some examples, it would make it easier.

I'll try it out

b.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
I love YaBB 1G - SP1!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hia!

is someone out there not using corporative software?? lets get back this thread to its path smiley-razz

Logged

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

I continued the discussion of the sensorbox firmware + flash in a new thread:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1148554125

But please do post questions with the Pduino code here and I'll check it.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
I love YaBB 1G - SP1!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi hans, first of.. i might be wrong but i guess the Pduino.01 release should include these filez you mentioned on the pd-list:
http://lists.puredata.info/pipermail/pd-list/2006-06/039287.html

they fixed some errors i was having..

and, apart from that, could you give a hand  on getting to control a stepper motor via firmata?

tx!

/a
Logged

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

On a related note, Martin Peach has written a PIC firmware that is compatible with the Pduino/Firmata firmware and the [arduino] Pd object:

http://pure-data.cvs.sourceforge.net/pure-data/externals/hardware/arduino/PICduino
Logged

Pages: [1]   Go Up
Jump to: