aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-02-09 14:00:10 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-02-09 14:00:10 +0000
commit8580bc658338105a88a41e1cf4171e7bd1f81263 (patch)
treeeac0452844f6fd10d9073964d349e5bdd9d14bf6
parent9bf6b5aecdd8c3edb43a513521daecae85949269 (diff)
converted all output messages except digital to lists instead of bytes so that they get bundled better into USB packets
svn path=/trunk/externals/hardware/arduino/; revision=13145
-rw-r--r--arduino.pd211
1 files changed, 112 insertions, 99 deletions
diff --git a/arduino.pd b/arduino.pd
index bd66103..195cd0a 100644
--- a/arduino.pd
+++ b/arduino.pd
@@ -1,11 +1,11 @@
-#N canvas 144 148 585 366 10;
+#N canvas 322 212 585 366 10;
#X obj 32 26 inlet;
#X obj 32 304 outlet;
#X obj 515 304 outlet;
-#N canvas 47 171 822 340 command 0;
+#N canvas 575 397 822 340 command 0;
#X obj 24 7 inlet;
#X obj 299 298 outlet;
-#N canvas 75 439 547 478 digital-out 0;
+#N canvas 631 434 547 478 digital-out 0;
#X obj 4 15 inlet;
#X obj 284 440 outlet;
#X msg 373 158 \$1;
@@ -72,28 +72,42 @@
#X connect 26 1 24 0;
#X connect 27 0 21 0;
#X restore 326 122 pd digital-out;
-#N canvas 244 210 540 347 pinMode 0;
-#X obj 190 11 inlet;
-#X obj 289 307 outlet;
-#X obj 60 91 unpack float float;
-#X text 27 90 pin#;
-#X text 177 92 mode;
-#X obj 60 146 moses 128;
-#X obj 190 35 trigger list bang;
-#X msg 289 256 244;
-#X obj 138 254 float;
-#X obj 36 202 trigger bang float;
-#X text 120 146 do bounds checking to be safe;
-#X connect 0 0 6 0;
+#N canvas 159 292 540 347 pinMode 0;
+#X obj 51 18 inlet;
+#X obj 51 290 outlet;
+#X obj 174 92 unpack float float;
+#X text 141 91 pin#;
+#X text 291 93 mode;
+#X obj 174 147 moses 128;
+#X msg 51 197 244;
+#X text 194 123 do bounds checking to be safe;
+#X obj 51 42 trigger bang anything;
+#X obj 51 222 pack float float float;
+#X obj 279 147 moses 128;
+#X obj 225 225 bang;
+#X obj 225 290 list trim;
+#X obj 225 270 list prepend ERROR:;
+#X msg 225 245 pinMode pin# greater than 127;
+#X obj 330 183 bang;
+#X msg 330 203 pinMode mode greater than 127;
+#X obj 225 310 print [arduino];
+#X connect 0 0 8 0;
#X connect 2 0 5 0;
-#X connect 2 1 8 1;
-#X connect 5 0 9 0;
-#X connect 6 0 2 0;
-#X connect 6 1 7 0;
-#X connect 7 0 1 0;
-#X connect 8 0 1 0;
-#X connect 9 0 8 0;
-#X connect 9 1 1 0;
+#X connect 2 1 10 0;
+#X connect 5 0 9 1;
+#X connect 5 1 11 0;
+#X connect 6 0 9 0;
+#X connect 8 0 6 0;
+#X connect 8 1 2 0;
+#X connect 9 0 1 0;
+#X connect 10 0 9 2;
+#X connect 10 1 15 0;
+#X connect 11 0 14 0;
+#X connect 12 0 17 0;
+#X connect 13 0 12 0;
+#X connect 14 0 13 0;
+#X connect 15 0 16 0;
+#X connect 16 0 13 0;
#X restore 238 94 pd pinMode;
#N canvas 300 373 372 380 pwm 0;
#X obj 44 14 inlet;
@@ -101,30 +115,29 @@
#X obj 44 79 unpack float float;
#X obj 44 124 + 224;
#X text 78 125 0xE0;
-#X msg 44 249 \$1 \, \$2 \, \$3;
#X obj 44 212 pack float float float;
#X obj 149 126 * 255;
#X obj 173 165 >> 7;
#X obj 108 165 & 127;
+#X msg 44 249 \$1 \$2 \$3;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
-#X connect 2 1 7 0;
-#X connect 3 0 6 0;
-#X connect 5 0 1 0;
-#X connect 6 0 5 0;
-#X connect 7 0 8 0;
-#X connect 7 0 9 0;
-#X connect 8 0 6 2;
-#X connect 9 0 6 1;
+#X connect 2 1 6 0;
+#X connect 3 0 5 0;
+#X connect 5 0 9 0;
+#X connect 6 0 7 0;
+#X connect 6 0 8 0;
+#X connect 7 0 5 2;
+#X connect 8 0 5 1;
+#X connect 9 0 1 0;
#X restore 24 94 pd pwm;
#X msg 307 94 info;
#X msg 500 136 249;
#N canvas 0 22 462 312 analogIns 0;
#X obj 64 7 inlet;
-#X obj 69 263 outlet;
+#X obj 64 263 outlet;
#X obj 64 65 unpack float float;
-#X obj 69 175 pack float float;
-#X msg 69 201 \$1 \, \$2;
+#X obj 64 175 pack float float;
#X obj 169 95 select 0;
#X obj 214 118 bang;
#X msg 214 140 1;
@@ -132,35 +145,35 @@
#X obj 64 124 + 192;
#X obj 64 95 moses 16;
#X text 100 123 0xC0;
+#X msg 64 201 \$1 \$2;
#X connect 0 0 2 0;
-#X connect 2 0 10 0;
-#X connect 2 1 5 0;
-#X connect 3 0 4 0;
-#X connect 4 0 1 0;
-#X connect 5 0 8 0;
-#X connect 5 1 6 0;
-#X connect 6 0 7 0;
+#X connect 2 0 9 0;
+#X connect 2 1 4 0;
+#X connect 3 0 11 0;
+#X connect 4 0 7 0;
+#X connect 4 1 5 0;
+#X connect 5 0 6 0;
+#X connect 6 0 3 1;
#X connect 7 0 3 1;
-#X connect 8 0 3 1;
-#X connect 9 0 3 0;
-#X connect 10 0 9 0;
+#X connect 8 0 3 0;
+#X connect 9 0 8 0;
+#X connect 11 0 1 0;
#X restore 69 94 pd analogIns;
#N canvas 609 386 341 294 digitalIns 0;
#X obj 87 26 inlet;
#X obj 87 250 outlet;
#X text 126 117 0xD0;
-#X msg 87 182 \$1 \, \$2;
#X obj 87 90 unpack float float;
#X obj 87 146 pack float float;
#X obj 87 117 + 208;
-#X connect 0 0 4 0;
-#X connect 3 0 1 0;
+#X msg 87 182 \$1 \$2;
+#X connect 0 0 3 0;
+#X connect 3 0 5 0;
+#X connect 3 1 4 1;
#X connect 4 0 6 0;
-#X connect 4 1 5 1;
-#X connect 5 0 3 0;
-#X connect 6 0 5 0;
+#X connect 5 0 4 0;
+#X connect 6 0 1 0;
#X restore 150 94 pd digitalIns;
-#X msg 536 137 240 \, 121 \, 247;
#X obj 500 116 bang;
#X obj 536 116 bang;
#X obj 24 51 route pwm analog analogIns digitalIns pinMode info;
@@ -278,30 +291,30 @@
#X restore 425 122 pd port-out;
#X obj 361 77 route digital port version firmware samplingInterval
;
-#N canvas 0 22 450 300 samplingInterval 0;
-#X obj 172 226 outlet;
-#X obj 78 21 inlet;
-#X text 225 34 LSB;
-#X obj 167 131 % 128;
-#X text 208 131 only 7-bits of data allowed;
-#X text 173 33 MSB;
-#X obj 167 77 >> 7;
-#X obj 79 51 trigger bang anything anything bang;
-#X msg 59 102 247;
-#X text 89 101 END_SYSEX;
-#X text 284 90 START_SYSEX then 0x7A;
-#X msg 219 89 240 \, 122;
-#X connect 1 0 7 0;
-#X connect 3 0 0 0;
-#X connect 6 0 3 0;
-#X connect 7 0 8 0;
-#X connect 7 1 6 0;
-#X connect 7 2 3 0;
-#X connect 7 3 11 0;
-#X connect 8 0 0 0;
-#X connect 11 0 0 0;
+#N canvas 429 448 450 300 samplingInterval 0;
+#X obj 39 252 outlet;
+#X obj 38 21 inlet;
+#X text 156 54 LSB;
+#X obj 39 131 % 128;
+#X text 103 54 MSB;
+#X obj 39 107 >> 7;
+#X obj 39 153 pack float float;
+#X obj 132 130 % 128;
+#X text 172 129 only 7-bit chunks of data allowed;
+#X msg 39 188 240 122 \$2 \$1 247;
+#X text 152 189 START_SYSEX 0x7A LSB MSB END_SYSEX;
+#X obj 39 71 trigger anything anything;
+#X connect 1 0 11 0;
+#X connect 3 0 6 0;
+#X connect 5 0 3 0;
+#X connect 6 0 9 0;
+#X connect 7 0 6 1;
+#X connect 9 0 0 0;
+#X connect 11 0 5 0;
+#X connect 11 1 7 0;
#X restore 572 110 pd samplingInterval;
-#X connect 0 0 12 0;
+#X msg 536 137 240 121 247;
+#X connect 0 0 11 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
@@ -309,28 +322,28 @@
#X connect 6 0 1 0;
#X connect 7 0 1 0;
#X connect 8 0 1 0;
-#X connect 9 0 1 0;
-#X connect 10 0 6 0;
-#X connect 11 0 9 0;
-#X connect 12 0 4 0;
-#X connect 12 1 4 0;
-#X connect 12 2 7 0;
-#X connect 12 3 8 0;
-#X connect 12 4 3 0;
-#X connect 12 5 5 0;
-#X connect 12 6 16 0;
-#X connect 13 0 1 0;
-#X connect 14 0 13 0;
-#X connect 14 1 13 1;
-#X connect 14 2 1 0;
-#X connect 15 0 2 1;
-#X connect 15 1 1 0;
-#X connect 16 0 2 0;
-#X connect 16 1 15 0;
-#X connect 16 2 10 0;
-#X connect 16 3 11 0;
-#X connect 16 4 17 0;
-#X connect 16 5 14 0;
+#X connect 9 0 6 0;
+#X connect 10 0 17 0;
+#X connect 11 0 4 0;
+#X connect 11 1 4 0;
+#X connect 11 2 7 0;
+#X connect 11 3 8 0;
+#X connect 11 4 3 0;
+#X connect 11 5 5 0;
+#X connect 11 6 15 0;
+#X connect 12 0 1 0;
+#X connect 13 0 12 0;
+#X connect 13 1 12 1;
+#X connect 13 2 1 0;
+#X connect 14 0 2 1;
+#X connect 14 1 1 0;
+#X connect 15 0 2 0;
+#X connect 15 1 14 0;
+#X connect 15 2 9 0;
+#X connect 15 3 10 0;
+#X connect 15 4 16 0;
+#X connect 15 5 13 0;
+#X connect 16 0 1 0;
#X connect 17 0 1 0;
#X restore 32 59 pd command processing;
#X text 28 8 processed input;
@@ -724,7 +737,7 @@ byte left over;
#X restore 32 229 pd convert to symbolic commands;
#X text 27 331 (C) Copyright 2006-2008 Free Software Foundation;
#X text 334 330 released under the GNU GPL v2 or later;
-#X obj 188 203 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 188 203 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 188 181 route open;
#X connect 0 0 3 0;