-
supermek
Hi all!
I'm rather new to pure data, and got inspired by this tutorial:
http://nf-interactive.blogspot.dk/2011/02/pure-data-to-arduino.html
http://puredata.hurleur.com/sujet-5250-puredata-arduino-serial-tutorialMy problem is now how to add more sliders, and pins in order to cycle the full spectrum of colours?
I assume I will have to split the serial output of pure data, and somehow read multiple bytes on the arduino?The sketch and patch I used as example, is already in this forum, from the bottom link above.
Thanks!
-
supermek
Once again, thank you Alexandros for enlighten me. I like that you don't just give it away, that would be too easy. The whole point of this tinkering, is to learn along. It is probably related to the fact, that I am impatient and want to learn it all at once, is surely making it a bit hard to grasp. It was after i got my arduino and watched some tutorials, on how to interact with it, that opened my eyes to Pure Data and it's awesomeness. I guess the right place to start, would be with some of the basics tutorials. Regarding the arduino I found this tutorial, which seems to have helped others understanding the basics of serial communication:
http://jhaskellsblog.blogspot.dk/2011/05/serial-comm-fundamentals-on-arduino.html
I'll have a look at it, and then give a shot
Thanks!
-
supermek
Thanks for the quick reply. I can't find much documentation on Serial.parseInt on the reference page?
I have to browse the web for some examples, so I can figure it out somehow. Regarding ASCII i suppose Pd should send i.e. 88 for the arduino to pick up an X ?This is what I have for the Arduino so far...
int red = 9;
int green = 10;
int blue = 11;
int R = 0;
int G = 0;
int B = 0;void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(blue, OUTPUT);}
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
int R = Serial.parseInt(); // R ASCII DEC 82
int G = Serial.parseInt(); // G ASCII DEC 71
int B = Serial.parseInt(); // B ASCII DEC 66// say what you got:
analogWrite(red, R);
analogWrite(green, G);
analogWrite(blue, ;
}
}What module/message should I put in pure data between comport and the slider, to hold the ASCII decimal in order for sending the right value?
Thanks again.
-
supermek
Great tutorial. I'm rather new to pure data, and was wondering how to add more faders? I'm trying to control a RGB led. I assume multiplexing would easily take care of this? But i can't seem to find a sketch and patch for this anywhere. Maybe another solution is to use standardFirmata, but then again i would not know how to. This is probably pretty basic stuff for someone above my level, so any help on guiding me in the right direction, would be greatly appreciated. Thanks!