Wiring Forum
http://wiring.org.co/cgi-bin/yabb/YaBB.pl
Programming Questions & Help >> Programs >> controlling wiring from puredata (pd)
http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1159756965

Message started by fkzz on 10/02/06 at 02:42:44

Title: controlling wiring from puredata (pd)
Post by fkzz on 10/02/06 at 02:42:44
Anyone here using wiring in hand with puredata?
Could you share some basic code for, say.. sending data from pd (hslider) to print at least some numbers down into wiring...

might this be a serial.read example?

hints appreciated, newbe here!

f.

Title: Re: controlling wiring from puredata (pd)
Post by barragan on 10/02/06 at 07:37:07
yes, just using the serial, I'llt ry to get a friend to post some of his examples.

Title: Re: controlling wiring from puredata (pd)
Post by fkzz on 10/02/06 at 14:16:07
that will be great! it will help us non-programmers to at least get the sintax right.
merci,
.f

Title: Re: controlling wiring from puredata (pd)
Post by uwa_irin on 10/31/06 at 03:17:45
as simple as this, save the text below, in any text editor, as:

serial_input.pd

(since it works with the wiring example of the same name, where the variable framerate should be spelled frameRate for it to work in the latest wiring release)

then open in puredata, select the serial port your wiring board is connected to and hit the H key (in caps) for a second. the on board LED will turn ON!

/uwa_irin

----begin of pd code, copy from below this line----

#N canvas 65 262 359 349 10;
#X msg 55 133 open \$1;
#N canvas 162 133 530 380 serin 0;
#X obj 120 61 cnv 15 15 15 empty \$0-number-canvas 1 4 7 0 14 -233017
-1 0;
#X obj 200 225 s \$0-number-canvas;
#X obj 60 61 hradio 15 1 0 4 empty empty empty 0 -6 0 8 -225271 -1
-1 0;
#X obj 59 147 outlet;
#X obj 60 13 inlet;
#X msg 200 202 label \$1;
#X obj 200 180 makefilename %d;
#X obj 59 108 float;
#X connect 2 0 7 0;
#X connect 4 0 2 0;
#X connect 5 0 1 0;
#X connect 6 0 5 0;
#X connect 7 0 3 0;
#X connect 7 0 6 0;
#X coords 0 -1 1 1 76 17 1 60 60;
#X restore 56 106 pd serin;
#X text 195 160 serial port #;
#X msg 55 155 close;
#X obj 54 298 comport 0 9600;
#X obj 65 263 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
-262144 -1 -1 46 256;
#X msg 54 177 devicename /dev/tty.usbserial-1B1;
#X obj 65 221 key;
#X obj 65 239 moses 72;
#X text 93 221 H mayuscula! = 72;
#X text 26 8 This will be the pd patch for the wiring Serial Input
example \, press H (in caps) for a second to see the on-board LED ON
\, then press any other key to turn it OFF;
#X text 189 58 alejoATaltred.net;
#X connect 0 0 4 0;
#X connect 1 0 0 0;
#X connect 3 0 4 0;
#X connect 5 0 4 0;
#X connect 6 0 4 0;
#X connect 7 0 8 0;
#X connect 8 0 5 0;
#X connect 8 1 4 0;

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.