Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

[size=16][highlight][color=#ff0000][b]This forum is now [u]READ-ONLY[/u]! Please visit [url]http://forum.wiring.co/[/url] for the new forum.[/b][/color][/highlight][/size]

Wiring ForumProgramming Questions & HelpPrograms › controlling wiring from puredata (pd)

Page Index Toggle Pages: 1
controlling wiring from puredata (pd) (Read 4847 times)
10/02/06 at 02:42:44

uwa_irin   Offline
YaBB Newbies

Posts: 3
*
 
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.
 

http://co.lab.cohete.net/
IP Logged
 
Reply #1 - 10/02/06 at 07:37:07

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
yes, just using the serial, I'llt ry to get a friend to post some of his examples.
 
IP Logged
 
Reply #2 - 10/02/06 at 14:16:07

uwa_irin   Offline
YaBB Newbies

Posts: 3
*
 
that will be great! it will help us non-programmers to at least get the sintax right.
merci,
.f
 

http://co.lab.cohete.net/
IP Logged
 
Reply #3 - 10/31/06 at 03:17:45

uwa_irin   Offline
YaBB Newbies

Posts: 3
*
 
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;
 

http://co.lab.cohete.net/
IP Logged
 
Page Index Toggle Pages: 1