hi,
i got my arduino to work with puredata by using hans steiner's pduino / firmata instructions. i pulsed all outputs in "arduino-test.pd" - the led blinks.
now i want to get data from 4 potentiometers and load 4 different sound files in pd. the sound is supposed to change depending on how far the potentiometer is turned.
i am a beginner to pd and have no idea how to start. i couldn't find any helpful pd patches examples on the web, any ideas where i could find one? or a website with more information on connecting sound and sensors with pduino?
thanks for any help!
-
Pduino and controlling sound over potentiometers
-
Hello.
I'm not familiar with Arduino, but, assuming that you are a beginner, as you say:
Make a [ctlin] object after you have the board plugged in and recognized, and connect the three outlets to separate number boxes, which will yield you (from left to right) (l) pot value, (m) pot id, (r) pot channel
Then, route these as you like.
edit: as with most objects, it is useful to right-click the [ctlin] object and then hit 'help' on the sub-menu so as to open up a patch that will explain things.
Hope that helps.
Good luck, and keep well ~ Shankar
-
The analog inputs have 1024 steps of resolution. If you are using the firmata analog input example, just enable the analog ins on the [arduino] object, and then use that value as an index to a [tabread4~]. You'll need to make a voltage divider with the pots, using the +5v, analog pins, and ground of the arduino.
Make sense?
-
thanks! i now managed to get values from 0 to 1024 from the potentiometers and connect them to sound. however, one of them is giving me weird numbers like a value of 22394, then sometimes it jumps back into the normal range, sometimes the number box just displays "+" instead of a number. any ideas what could be the problem?
-
when the number box displays + it means the number has too many digits for the number box to display, so go into properties and increase the width. If your getting weird numbers from one of the potentiometers, try plugging it into the arduino input that you know works (just to make sure it isn't the potentiometer), Otherwise I would imagine it has something to do with the arduino's analog-to-digitial conversion - are you sure that the input you plugged it into is supposed to handle the kind of input you are giving, e.t.c. e.t.c.
Dual 1.8 IBM G5: Mac OSX 10.4.11 -- Asus eeePC 701: Pure:Dyne / eeeXubuntu GNU/Linux -- myspace.com/thearifd
-
Good to hear it worked out. One question, are you experiencing any lag? I had problems with analog input on Arduino, the serial object overwhelmed whatever I put it's output into (i think). I was getting a noticeable lag between messages. I never straightened it out... I put that project aside for an electromechanical tremolo using a hd motor and photodetectors -- controlled by arduino of course.