PureData

#N canvas 789 22 873 438 10;
#X obj 94 316 comport 1 9600;
#X obj 177 211 select 0 1;
#X obj 183 178 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 233 260 open 1;
#X msg 183 258 close;
#X msg 314 265 ports;
#X obj 175 346 route ports;
#X obj 175 372 print port_list;
#X text 368 264 will print out available ports to message window;
#X text -204 -29 Physical Pixel This patch sends an ASCII H or an ASCII
L out the serial port to turn on an LED attached to an Arduino board.
It can also send alternating H and L characters once every second to
make the LED blink. Sept 28 \, 2010 by Scott Fitzgerald \, based off
the Dimmer Max/MSP example by David Mellis \, Tom Igoe and myself;
#X obj 50 205 select 0 1;
#X obj 51 172 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X text -104 169 click to turn LED on/off;
#N canvas 571 446 450 300 blink 0;
#X obj 31 26 inlet;
#X obj 33 264 outlet;
#X obj 39 102 metro 1000;
#X obj 39 166 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
#X restore -176 171 pd blink;
#X obj -180 141 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1
0 1;
#X text -183 124 toggle to blink every second;
#X text 204 177 toggle to open serial port;
#X msg 50 235 76;
#X msg 87 235 77;
#X connect 0 1 6 0;
#X connect 1 0 4 0;
#X connect 1 1 3 0;
#X connect 2 0 1 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 7 0;
#X connect 10 0 17 0;
#X connect 10 1 18 0;
#X connect 11 0 10 0;
#X connect 13 0 10 0;
#X connect 14 0 13 0;
#X connect 17 0 0 0;
#X connect 18 0 0 0;