aboutsummaryrefslogtreecommitdiff
path: root/arduino.pd
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-03-05 17:08:51 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-03-05 17:08:51 +0000
commiteb1e00ff18078e997dbb84f9a4ed08052a57face (patch)
treedcb0dff6fc4151adbbe1bdada0c85ef0bee723a7 /arduino.pd
parent8ac04cbb96f8b6ed2bb28fbb559c93b032b4bfe6 (diff)
- Removed lots of cruft and various attempts at fixing things.
- Removed timer2 interrupt code because it was interfering with the hardware PWM on some pins. Replaced it with timer0_overflow_count from wiring.c but that's not fully functional yet, I think I have to get the time units right. Right now it seems to just output everytime rather than every 4ms - removed second [arduino] object in arduino-test.pd that was causing lost serial data. WORKING - analog input working - hardware PWM output working - digital output working - setPinMode to INPUT/OUTPUT for digital pins working NOT WORKING YET - digital inputs - software PWM on non-hardware-PWM pins - save state to EEPROM svn path=/trunk/externals/hardware/arduino/; revision=7468
Diffstat (limited to 'arduino.pd')
-rw-r--r--arduino.pd228
1 files changed, 101 insertions, 127 deletions
diff --git a/arduino.pd b/arduino.pd
index bd3a913..fb5a329 100644
--- a/arduino.pd
+++ b/arduino.pd
@@ -1,52 +1,52 @@
-#N canvas 365 27 652 384 10;
+#N canvas 365 27 676 408 10;
#X obj 377 9 import hardware flatspace iemlib mapping;
#X text 321 336 released under the GNU GPL;
#X obj 61 19 inlet;
#X obj 61 297 outlet;
#X obj 544 297 outlet;
-#N canvas 405 22 673 393 command 0;
+#N canvas 350 22 685 405 command 1;
#X obj 24 7 inlet;
#X obj 281 289 outlet;
#X obj 210 93 clip 0 1;
#X obj 210 114 int;
-#N canvas 729 244 495 303 digital-out 0;
+#N canvas 729 244 499 307 digital-out 0;
#X obj 26 12 inlet;
#X obj 218 219 outlet;
-#X obj 181 137 trigger bang float;
#X obj 97 172 float;
#X obj 26 31 trigger anything bang;
-#X obj 27 137 trigger float bang;
#X obj 218 171 float;
#X obj 26 77 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13;
#X obj 181 115 bytemask -----;
#X obj 27 115 bytemask ---------;
#X msg 404 92 144;
-#X connect 0 0 4 0;
-#X connect 2 0 3 0;
-#X connect 2 1 6 0;
-#X connect 3 0 1 0;
-#X connect 4 0 7 0;
-#X connect 4 1 10 0;
-#X connect 5 0 3 0;
-#X connect 5 1 6 0;
-#X connect 6 0 1 0;
+#X obj 27 137 trigger bang float;
+#X obj 181 137 trigger float bang;
+#X connect 0 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 5 0;
+#X connect 3 1 8 0;
+#X connect 4 0 1 0;
+#X connect 5 0 7 0;
+#X connect 5 1 7 1;
+#X connect 5 2 7 2;
+#X connect 5 3 7 3;
+#X connect 5 4 7 4;
+#X connect 5 5 7 5;
+#X connect 5 6 7 6;
+#X connect 5 7 6 0;
+#X connect 5 8 6 1;
+#X connect 5 9 6 2;
+#X connect 5 10 6 3;
+#X connect 5 11 6 4;
+#X connect 5 12 6 5;
+#X connect 5 13 6 6;
+#X connect 6 0 10 0;
#X connect 7 0 9 0;
-#X connect 7 1 9 1;
-#X connect 7 2 9 2;
-#X connect 7 3 9 3;
-#X connect 7 4 9 4;
-#X connect 7 5 9 5;
-#X connect 7 6 9 6;
-#X connect 7 7 8 0;
-#X connect 7 8 8 1;
-#X connect 7 9 8 2;
-#X connect 7 10 8 3;
-#X connect 7 11 8 4;
-#X connect 7 12 8 5;
-#X connect 7 13 8 6;
-#X connect 8 0 2 0;
-#X connect 9 0 5 0;
-#X connect 10 0 1 0;
+#X connect 8 0 1 0;
+#X connect 9 0 2 0;
+#X connect 9 1 4 0;
+#X connect 10 0 2 0;
+#X connect 10 1 4 0;
#X restore 377 118 pd digital-out;
#N canvas 310 221 536 343 pinMode 0;
#X obj 190 11 inlet;
@@ -78,107 +78,79 @@
#X connect 13 0 12 0;
#X connect 13 1 1 0;
#X restore 280 93 pd pinMode;
-#X obj 139 133 + 160;
#X obj 210 135 + 150;
-#N canvas 291 228 432 364 pwm 0;
+#N canvas 300 373 368 376 pwm 0;
#X obj 44 14 inlet;
-#X msg 327 220 251;
-#X obj 114 312 outlet;
-#X obj 232 185 * 255;
-#X obj 232 164 clip 0 1;
-#X obj 232 205 int;
-#N canvas 0 22 462 312 list-rev 0;
-#X obj 92 29 inlet;
-#N canvas 0 22 533 407 drip 0;
-#X obj 64 206 list split 1;
-#X obj 64 123 until;
-#X obj 64 181 list append;
-#X obj 194 206 bang;
-#X obj 64 243 outlet;
-#X obj 64 57 inlet;
-#X text 237 44 From list-help.pd;
-#X obj 143 243 outlet;
-#X obj 64 86 t b a;
-#X connect 0 0 4 0;
-#X connect 0 1 2 1;
-#X connect 0 2 3 0;
-#X connect 0 2 7 0;
-#X connect 1 0 2 0;
-#X connect 2 0 0 0;
-#X connect 3 0 1 1;
-#X connect 5 0 8 0;
-#X connect 8 0 1 0;
-#X connect 8 1 2 1;
-#X restore 92 94 pd drip;
-#X obj 148 141 t l;
-#X obj 92 141 list;
-#X obj 136 207 list;
-#X obj 136 259 outlet;
-#X text 174 95 drip list;
-#X text 174 210 intermediate store \, bang'd on list end.;
-#X text 178 140 repack in reverse order;
-#X obj 92 54 t a b b;
-#X connect 0 0 9 0;
-#X connect 1 0 3 0;
-#X connect 1 1 4 0;
-#X connect 2 0 3 1;
-#X connect 3 0 2 0;
-#X connect 3 0 4 1;
-#X connect 4 0 5 0;
-#X connect 9 0 1 0;
-#X connect 9 1 3 1;
-#X connect 9 2 4 1;
-#X restore 44 54 pd list-rev;
-#X obj 44 113 route off;
-#X msg 74 170 250;
-#X obj 44 83 list trim;
-#X text 361 222 PWM on;
-#X obj 44 145 t f b;
-#X text 105 170 PWM off;
-#X obj 232 141 unpack f f;
-#X obj 297 195 t f b;
-#X connect 0 0 6 0;
-#X connect 1 0 2 0;
-#X connect 3 0 5 0;
-#X connect 4 0 3 0;
-#X connect 5 0 2 0;
-#X connect 6 0 9 0;
-#X connect 7 0 11 0;
-#X connect 7 1 13 0;
-#X connect 8 0 2 0;
-#X connect 9 0 7 0;
-#X connect 11 0 2 0;
-#X connect 11 1 8 0;
-#X connect 13 0 4 0;
-#X connect 13 1 14 0;
-#X connect 14 0 2 0;
-#X connect 14 1 1 0;
+#X obj 44 312 outlet;
+#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 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 restore 24 94 pd pwm;
#X msg 359 93 info;
#X obj 412 91 route digital version;
#X obj 24 51 route pwm analog analogIns digitalIns pinMode info;
-#X obj 139 93 clip 0 9;
#X msg 473 118 249;
-#X connect 0 0 11 0;
+#N canvas 0 22 454 304 analogIns 0;
+#X obj 64 7 inlet;
+#X obj 69 263 outlet;
+#X obj 64 65 unpack float float;
+#X obj 69 175 pack float float;
+#X msg 69 201 \$1 \, \$2;
+#X obj 169 95 select 0;
+#X obj 214 118 bang;
+#X msg 214 140 1;
+#X msg 169 117 0;
+#X obj 64 124 + 192;
+#X obj 64 95 moses 16;
+#X text 100 123 0xC0;
+#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 7 0 3 1;
+#X connect 8 0 3 1;
+#X connect 9 0 3 0;
+#X connect 10 0 9 0;
+#X restore 106 94 pd analogIns;
+#X connect 0 0 10 0;
#X connect 2 0 3 0;
-#X connect 3 0 7 0;
+#X connect 3 0 6 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
#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 4 0;
-#X connect 10 1 13 0;
-#X connect 10 2 1 0;
-#X connect 11 0 8 0;
-#X connect 11 2 12 0;
-#X connect 11 3 2 0;
-#X connect 11 4 5 0;
-#X connect 11 5 9 0;
-#X connect 11 6 10 0;
-#X connect 12 0 6 0;
-#X connect 13 0 1 0;
+#X connect 9 0 4 0;
+#X connect 9 1 11 0;
+#X connect 9 2 1 0;
+#X connect 10 0 7 0;
+#X connect 10 1 7 0;
+#X connect 10 2 12 0;
+#X connect 10 3 2 0;
+#X connect 10 4 5 0;
+#X connect 10 5 8 0;
+#X connect 10 6 9 0;
+#X connect 11 0 1 0;
+#X connect 12 0 1 0;
#X restore 61 52 pd command processing;
#X obj 319 19 inlet;
#X text 306 1 raw input;
@@ -191,7 +163,7 @@
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 410 112 pd report object version;
-#N canvas 0 22 466 316 report 0;
+#N canvas 0 22 474 324 report 0;
#X obj 66 7 inlet;
#X obj 66 36 route open;
#X obj 66 60 select 1;
@@ -203,7 +175,7 @@
#X connect 4 0 3 0;
#X restore 231 113 pd report firmware version;
#X text 335 299 DEBUG/RAW data (this will change);
-#N canvas 72 70 443 397 make 0;
+#N canvas 225 71 451 405 make 0;
#X obj 79 6 inlet;
#X obj 184 337 outlet;
#X obj 79 72 moses 128;
@@ -258,10 +230,10 @@
#X obj 117 188 - 1;
#X obj 79 128 trigger bang float;
#X text 140 72 only process command bytes;
-#N canvas 0 22 470 320 convert 0;
+#N canvas 0 22 474 324 convert 0;
#X obj 142 218 outlet;
#X obj 257 218 print UNKNOWN_INPUT_COMMAND;
-#N canvas 123 202 626 303 digital 0;
+#N canvas 123 202 630 307 digital 0;
#X obj 163 16 inlet;
#X obj 252 255 outlet;
#X obj 163 42 unpack float float;
@@ -364,17 +336,19 @@
#X connect 9 1 5 0;
#X connect 11 0 1 0;
#X restore 62 199 pd make lists;
-#N canvas 0 22 501 245 check 0;
+#N canvas 0 22 521 265 check 0;
#X obj 47 62 inlet;
#X obj 47 88 route version;
-#X obj 47 109 unpack float float;
-#X obj 92 153 print [arduino]_WARNING_INCOMPATIBLE_FIRMWARE_VERSION
+#X obj 87 119 unpack float float;
+#X obj 132 163 print [arduino]_WARNING_INCOMPATIBLE_FIRMWARE_VERSION
;
-#X obj 47 131 select 1;
-#X text 102 132 <-- this sets the firmware version this is compatible
+#X obj 87 141 select 1;
+#X text 142 142 <-- this sets the firmware version this is compatible
with;
+#X obj 47 192 print Arduino/Firmata_version;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
+#X connect 1 0 6 0;
#X connect 2 0 4 0;
#X connect 4 1 3 0;
#X restore 92 242 pd check version;