aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-02-09 14:34:43 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-02-09 14:34:43 +0000
commitf9a9f52d8a6004a40c49498a3cba144fb1286655 (patch)
tree9cba115b44deac2bf0a707870b4b4c16d4aa5143
parent8580bc658338105a88a41e1cf4171e7bd1f81263 (diff)
- made [pinMode INPUT( also send [digitalIns( so that you only need to switch
a pin to INPUT mode in order to get data - removed some extraneous dollarg message boxes that were left from converting the messages from byte streams to lists of bytes. svn path=/trunk/externals/hardware/arduino/; revision=13146
-rw-r--r--arduino.pd133
1 files changed, 77 insertions, 56 deletions
diff --git a/arduino.pd b/arduino.pd
index 195cd0a..38a1720 100644
--- a/arduino.pd
+++ b/arduino.pd
@@ -1,8 +1,8 @@
-#N canvas 322 212 585 366 10;
+#N canvas 181 226 585 366 10;
#X obj 32 26 inlet;
#X obj 32 304 outlet;
#X obj 515 304 outlet;
-#N canvas 575 397 822 340 command 0;
+#N canvas 203 350 822 340 command 1;
#X obj 24 7 inlet;
#X obj 299 298 outlet;
#N canvas 631 434 547 478 digital-out 0;
@@ -72,18 +72,17 @@
#X connect 26 1 24 0;
#X connect 27 0 21 0;
#X restore 326 122 pd digital-out;
-#N canvas 159 292 540 347 pinMode 0;
+#N canvas 82 280 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 obj 51 320 outlet;
+#X obj 174 72 unpack float float;
+#X text 141 71 pin#;
+#X text 291 73 mode;
+#X obj 174 117 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 text 194 101 do bounds checking to be safe;
#X obj 51 222 pack float float float;
-#X obj 279 147 moses 128;
+#X obj 279 117 moses 128;
#X obj 225 225 bang;
#X obj 225 290 list trim;
#X obj 225 270 list prepend ERROR:;
@@ -91,23 +90,54 @@
#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;
+#N canvas 580 301 396 304 turn 0;
+#X obj 123 21 inlet;
+#X obj 43 21 inlet;
+#X obj 123 78 select 0;
+#X text 178 78 INPUT;
+#X obj 215 252 outlet;
+#X obj 110 135 spigot;
+#X msg 123 109 1;
+#X obj 215 180 >> 3;
+#X obj 110 158 trigger bang float;
+#X msg 152 109 0;
+#X text 254 201 0xD0;
+#X obj 215 201 + 208;
+#X obj 215 228 pack float 1;
+#X text 42 202 generate digitalIns message;
+#X connect 0 0 2 0;
+#X connect 1 0 5 0;
+#X connect 2 0 6 0;
+#X connect 5 0 8 0;
+#X connect 6 0 5 1;
+#X connect 7 0 11 0;
+#X connect 8 0 9 0;
+#X connect 8 1 7 0;
+#X connect 9 0 5 1;
+#X connect 11 0 12 0;
+#X connect 12 0 4 0;
+#X restore 174 154 pd turn digital reporting on;
+#X obj 51 42 trigger bang anything;
+#X connect 0 0 18 0;
#X connect 2 0 5 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 2 1 9 0;
+#X connect 5 0 8 1;
+#X connect 5 0 17 0;
+#X connect 5 1 10 0;
+#X connect 6 0 8 0;
+#X connect 8 0 1 0;
+#X connect 9 0 8 2;
+#X connect 9 0 17 1;
+#X connect 9 1 14 0;
+#X connect 10 0 13 0;
+#X connect 11 0 16 0;
+#X connect 12 0 11 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 connect 14 0 15 0;
+#X connect 15 0 12 0;
+#X connect 17 0 1 0;
+#X connect 18 0 6 0;
+#X connect 18 1 2 0;
#X restore 238 94 pd pinMode;
#N canvas 300 373 372 380 pwm 0;
#X obj 44 14 inlet;
@@ -119,17 +149,15 @@
#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 6 0;
#X connect 3 0 5 0;
-#X connect 5 0 9 0;
+#X connect 5 0 1 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;
@@ -145,11 +173,10 @@
#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 9 0;
#X connect 2 1 4 0;
-#X connect 3 0 11 0;
+#X connect 3 0 1 0;
#X connect 4 0 7 0;
#X connect 4 1 5 0;
#X connect 5 0 6 0;
@@ -157,22 +184,19 @@
#X connect 7 0 3 1;
#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;
+#N canvas 592 91 341 294 digitalIns 0;
#X obj 87 26 inlet;
#X obj 87 250 outlet;
#X text 126 117 0xD0;
#X obj 87 90 unpack float float;
#X obj 87 146 pack float float;
#X obj 87 117 + 208;
-#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 0 1 0;
#X connect 5 0 4 0;
-#X connect 6 0 1 0;
#X restore 150 94 pd digitalIns;
#X obj 500 116 bang;
#X obj 536 116 bang;
@@ -347,14 +371,6 @@
#X connect 17 0 1 0;
#X restore 32 59 pd command processing;
#X text 28 8 processed input;
-#X obj 381 95 loadbang;
-#N canvas 0 22 462 312 report 0;
-#X obj 95 26 inlet;
-#X obj 97 186 print [arduino];
-#X msg 93 87 version_0.4;
-#X connect 0 0 2 0;
-#X connect 2 0 1 0;
-#X restore 381 119 pd report object version;
#N canvas 0 22 395 210 report 0;
#X obj 62 21 inlet;
#X obj 62 50 route open;
@@ -740,16 +756,21 @@ byte left over;
#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 obj 450 83 print [arduino];
+#X obj 450 36 loadbang;
+#X text 417 7 supports Firmata v2.1;
+#X msg 450 59 version_0.5beta7;
#X connect 0 0 3 0;
-#X connect 3 0 10 0;
-#X connect 5 0 6 0;
-#X connect 7 0 3 0;
-#X connect 8 0 11 0;
-#X connect 10 0 8 0;
-#X connect 10 1 7 0;
-#X connect 10 1 2 0;
-#X connect 10 1 15 0;
-#X connect 11 0 1 0;
-#X connect 11 0 9 0;
-#X connect 11 1 2 0;
-#X connect 15 0 14 0;
+#X connect 3 0 8 0;
+#X connect 5 0 3 0;
+#X connect 6 0 9 0;
+#X connect 8 0 6 0;
+#X connect 8 1 5 0;
+#X connect 8 1 2 0;
+#X connect 8 1 13 0;
+#X connect 9 0 1 0;
+#X connect 9 0 7 0;
+#X connect 9 1 2 0;
+#X connect 13 0 12 0;
+#X connect 15 0 17 0;
+#X connect 17 0 14 0;