I'll post lots of stuff talking to Pure Data in the near future.
-
Yay...
-
Yay!
I'll be looking forward to the simple stuff in particular, which I might be able to implement and explore.
Keep well all ~ Ssssssssssss
-
Yesyes, i'm also looking forward to this. Some time ago i bought myself an arduino starter-kit (with the latest board + a breadboard, leds and knobs) but i haven't the faintest idea how to connect what to what... Maybe some riddles will get solved here...
D.
|] [] |.| ][|-| -- http://soundcloud.com/domxh
-
Sometime this week or next week, i'll put together a tutorial of sorts for getting arduino and pd working together like good children.
puredata punx http://www.cyberpunki.biz
-
That would be marvelous... let the countdown and sleepless nights begin
|] [] |.| ][|-| -- http://soundcloud.com/domxh
-
I'll post my hacky patch that connects Arduino to PD & Flash later when I get back home and clean it up somewhat...
-
I took this from my blog which is an eyesore and hard to concentrate on.
Let's learn how to combine arduino and puredata into one almighty power, the mighty AARRGHDATA(i think the proper name is the classier pduino, i guess you say it peedweeno, or padooiino)
Firstly. If you haven't already, check that your arduino is working. if you know this. keep scrolling until you see a kitten.
Plug it in and fire up the arduino software. You can get that from here
now lets do a quick test(is shouldve flashed when you plugged it in anyway) but get an LED, and put it so that the longer leg(theres a fancy name for this) is in the slot for digital pin 13 and the shorter leg(also has a fancy name) is in GND(you could say things "gund" or "gnnnd" but im fairly sure it just means GROUND.now go file>sketchbook>examples>digital>blink and it will open that sketch. click the "upload" button and watch as it updates you on upload status and tells you when its complete.
is it blinking? nice. i could go on more about this, but i want to talk about PD, thats where it gets fun.
KITTENS
you can start looking again if you like pd.
once again, go to file>sketchbook>examples>library-firmata>standard firmata
dont see it? its a standard library now, so you should probably check you have the latest version(anything above 12 will be fine)around this time you want to open pd and try create an object called "arduino". nothing? then you need to be going here to visit the wonderful mr hans, and download pduino.(i'm not sure if the arduino library is standard in pd extended now)
did you upload that standard firmata sketch to your board? i didnt tell you to. but thats ok, i like the way you think. do that if you haven't.
once thats uploaded properly, you can quit the arduino software, we do not need its services anymore.now go inside that pduino folder you downloaded and open the patch arduino-test.pd
you should see something like thisss.
i dont know why all those errors happen. but click the "devices" message box in there to check what port your arduino is on.
hans is pretty awesome for making this patch, its really easy to understand i think.
change your port to whatever pd tells you your arduino is on.HUZZAH! CONNECTIVITY!
now, lets say we still have that LED plugged in. want to test it?
hit that "pulse all outputs" toggle, and it should blink on and off. look around that subpatch, its pretty simple too. (you will want to know all these messages to send when writing your own patch for stuff)
Input is easy too. turn on that little toggle under [arduino 1] to let through outlet info.
you'll also want to enable your analogIns in the yellow radio up there.
say you had a potentiometer you wanted to connect up, it's really easy. and a breadboard will make all your connections easier to make.but you'd just connect it up like this.
then you'd just enable the input you are using in that patch(input 2 in this case) and watch the input stream in through the a3 number box at the bottom.
this is how it works for me anyway.
that should just show you how the basics of it work, and you can move from there.
puredata punx http://www.cyberpunki.biz
-
Hi, I am just starting with arduino, and still not very experienced in PD.
I have found tons of great info around here, thanks for that.For me, everything works up to a point:
* I successfully upload the Firmata
* the output example in Processing works, I am able to turn pin 13 on and off
* in PD I open the correct port ("[comport] opened serial line device 3 (/dev/ttyUSB0)")
however, I have not been able to get any communication with the arduino in PD using Hans-Christoph Steiner's [arduino] - either turn pin 13 on/off or get firmware information. The numerical commands sent to [comport] seem correct, e.g. 249 for version information, etc.So, the only place it seems possible to be going wrong is either [comport] or after that, along the line. As I said, it works with the same port from Processing, and at the same rate - 115200
"get_baud_ratebits: 115200.000000
set_baudrate baudbits: 4098 /***(what does this second line mean?)
[comport] opened serial line device 3 (/dev/ttyUSB0)"I am running Ubuntu Intrepid, latest versions of Pd-extended, Arduino IDE, Firmata. The board is old though, "Arduino NG or older w/ ATmega8" but I guess this doesn't matter if the above mentioned things work.
I still have to test it for input, but I have to pick up some sensors from the shop.
If [arduino] does not work out I may try Messenger, but it really seemed quite good for what I am trying to do (drums with input from piezo elements).
edit:
This *may* have been due to a bad Arduino board, because I am now unable to transfer any sketches to it. Surprisingly though the Processing example still works (Firmata is left on the board from the time transfers worked)