aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arduino-test.pd164
-rw-r--r--arduino.pd131
2 files changed, 213 insertions, 82 deletions
diff --git a/arduino-test.pd b/arduino-test.pd
index 178fa2f..97993b5 100644
--- a/arduino-test.pd
+++ b/arduino-test.pd
@@ -1,4 +1,4 @@
-#N canvas 704 22 674 529 10;
+#N canvas 427 22 674 529 10;
#X obj 512 7 import hardware mapping;
#X obj 323 126 cnv 15 100 22 empty empty empty 20 12 0 14 -253938 -66577
0;
@@ -64,7 +64,7 @@
1;
#X text 478 206 enable/disable digitalIns;
#X msg 455 225 digitalIns \$1;
-#X msg 455 183 analogIns 5 0;
+#X msg 455 183 analogIns 1 0;
#N canvas 162 133 610 460 serin 0;
#X obj 59 337 outlet;
#X obj 59 266 trigger bang anything;
@@ -236,7 +236,7 @@
#X connect 16 0 17 0;
#X connect 17 0 14 0;
#X restore 41 135 pd pwm;
-#X msg 41 157 pwm 9 off;
+#X msg 41 157 pwm 11 0;
#X msg 319 175 info;
#X msg 358 175 version;
#X obj 230 322 spigot;
@@ -430,7 +430,6 @@ Arduino (previously known as Pduino firmware).;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X restore 45 410 pd display values without pegging the CPU;
-#X obj 397 379 route digital version;
#X obj 397 436 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13;
#X obj 428 458 tgl 15 0 empty empty 2 4 23 1 12 -232448 -1 -1 0 1;
#X obj 445 458 tgl 15 0 empty empty 3 4 23 1 12 -232448 -1 -1 0 1;
@@ -456,8 +455,8 @@ Arduino (previously known as Pduino firmware).;
#X text 2 494 (C) Copyright 2006 Free Software Foundation;
#N canvas 0 22 451 224 ver 0;
#X obj 23 7 inlet;
-#X obj 250 100 cnv 15 145 17 empty \$0-version_cnv firmata_version_1.0
-4 10 0 12 -203904 -1 0;
+#X obj 250 100 cnv 15 145 17 empty \$0-version_cnv empty 4 10 0 12
+-203904 -1 0;
#X obj 23 157 send \$0-version_cnv;
#X msg 23 132 label \$1;
#X obj 23 52 zexy/makesymbol firmata_version_%s.%s;
@@ -561,8 +560,8 @@ Arduino (previously known as Pduino firmware).;
#X obj 230 302 arduino 1;
#N canvas 649 518 412 212 firmware 0;
#X obj 123 7 inlet;
-#X obj 250 100 cnv 15 145 17 empty \$0-firmware_cnv Standard_Firmata-2.0
-4 10 0 12 -232576 -66577 0;
+#X obj 250 100 cnv 15 145 17 empty \$0-firmware_cnv empty 4 10 0 12
+-232576 -66577 0;
#X msg 123 152 label \$1;
#X obj 148 123 symbol;
#X obj 138 97 loadbang;
@@ -587,41 +586,95 @@ Arduino (previously known as Pduino firmware).;
#X restore 67 339 pd firmware;
#X msg 358 215 devices;
#X msg 358 195 firmware;
-#X connect 4 0 99 0;
+#X obj 397 379 route digital version string;
+#N canvas 0 22 450 300 STRING 0;
+#X obj 48 13 inlet;
+#X obj 51 93 moocow/string2any 32 -1;
+#X obj 51 154 print STRING;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 539 399 pd STRING;
+#N canvas 0 22 450 300 Marg 0;
+#X obj 139 19 inlet;
+#X obj 127 109 moocow/string2any 32 -1;
+#X obj 127 170 print STRING;
+#X obj 97 55 list split 1;
+#X obj 40 109 print COMMAND;
+#X obj 210 54 print Marg;
+#X connect 0 0 3 0;
+#X connect 0 0 5 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 1 1 0;
+#X restore 604 399 pd Marg;
+#N canvas 284 22 487 372 strings 0;
+#X obj -178 287 outlet;
+#X obj -142 101 moocow/any2string;
+#X symbolatom -92 48 10 0 0 0 - - -;
+#X obj -119 179 pddp/print;
+#X obj -92 68 list trim;
+#X msg -175 39 test;
+#X msg -139 40 TEST;
+#X obj -142 130 cyclone/prepend string;
+#X obj -313 102 moocow/any2string;
+#X symbolatom -263 49 10 0 0 0 - - -;
+#X obj -314 202 pddp/print;
+#X obj -263 69 list trim;
+#X msg -346 40 test;
+#X msg -310 41 TEST;
+#X obj -313 153 cyclone/prepend sysex;
+#X obj -313 131 cyclone/prepend 40;
+#X connect 1 0 7 0;
+#X connect 2 0 4 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 1 0;
+#X connect 7 0 3 0;
+#X connect 7 0 0 0;
+#X connect 8 0 15 0;
+#X connect 9 0 11 0;
+#X connect 11 0 8 0;
+#X connect 12 0 8 0;
+#X connect 13 0 8 0;
+#X connect 14 0 0 0;
+#X connect 14 0 10 0;
+#X connect 15 0 14 0;
+#X restore 437 252 pd strings and special messages;
+#X connect 4 0 98 0;
#X connect 5 0 4 0;
#X connect 5 1 8 0;
-#X connect 8 0 99 0;
+#X connect 8 0 98 0;
#X connect 9 0 18 2;
#X connect 10 0 18 1;
#X connect 11 0 41 1;
#X connect 12 0 45 1;
#X connect 13 0 15 0;
-#X connect 15 0 99 0;
-#X connect 16 0 99 0;
+#X connect 15 0 98 0;
+#X connect 16 0 98 0;
#X connect 17 0 16 0;
#X connect 26 0 41 0;
#X connect 41 0 42 0;
-#X connect 42 0 99 0;
-#X connect 43 0 99 0;
-#X connect 44 0 99 0;
+#X connect 42 0 98 0;
+#X connect 43 0 98 0;
+#X connect 44 0 98 0;
#X connect 45 0 66 0;
-#X connect 47 0 89 2;
-#X connect 48 0 89 3;
-#X connect 49 0 89 4;
-#X connect 50 0 89 5;
-#X connect 51 0 89 6;
-#X connect 52 0 89 7;
-#X connect 53 0 89 8;
-#X connect 54 0 89 9;
-#X connect 55 0 89 10;
-#X connect 56 0 89 11;
-#X connect 57 0 89 12;
-#X connect 58 0 89 13;
-#X connect 60 0 99 0;
-#X connect 61 0 99 0;
+#X connect 47 0 88 2;
+#X connect 48 0 88 3;
+#X connect 49 0 88 4;
+#X connect 50 0 88 5;
+#X connect 51 0 88 6;
+#X connect 52 0 88 7;
+#X connect 53 0 88 8;
+#X connect 54 0 88 9;
+#X connect 55 0 88 10;
+#X connect 56 0 88 11;
+#X connect 57 0 88 12;
+#X connect 58 0 88 13;
+#X connect 60 0 98 0;
+#X connect 61 0 98 0;
#X connect 62 0 61 0;
#X connect 66 0 67 0;
-#X connect 66 1 69 0;
+#X connect 66 1 102 0;
#X connect 67 0 68 0;
#X connect 67 1 68 1;
#X connect 67 2 68 2;
@@ -638,27 +691,30 @@ Arduino (previously known as Pduino firmware).;
#X connect 68 5 24 0;
#X connect 68 6 64 0;
#X connect 68 7 65 0;
-#X connect 69 0 70 0;
-#X connect 69 1 86 0;
-#X connect 70 2 71 0;
-#X connect 70 3 72 0;
-#X connect 70 4 73 0;
-#X connect 70 5 74 0;
-#X connect 70 6 75 0;
-#X connect 70 7 76 0;
-#X connect 70 8 77 0;
-#X connect 70 9 78 0;
-#X connect 70 10 79 0;
-#X connect 70 11 80 0;
-#X connect 70 12 81 0;
-#X connect 70 13 82 0;
-#X connect 83 0 99 1;
-#X connect 85 0 100 0;
-#X connect 86 0 87 0;
-#X connect 86 1 88 0;
-#X connect 89 0 60 0;
-#X connect 99 0 45 0;
-#X connect 99 0 85 0;
-#X connect 99 1 18 0;
-#X connect 101 0 99 0;
-#X connect 102 0 99 0;
+#X connect 69 2 70 0;
+#X connect 69 3 71 0;
+#X connect 69 4 72 0;
+#X connect 69 5 73 0;
+#X connect 69 6 74 0;
+#X connect 69 7 75 0;
+#X connect 69 8 76 0;
+#X connect 69 9 77 0;
+#X connect 69 10 78 0;
+#X connect 69 11 79 0;
+#X connect 69 12 80 0;
+#X connect 69 13 81 0;
+#X connect 82 0 98 1;
+#X connect 84 0 99 0;
+#X connect 85 0 86 0;
+#X connect 85 1 87 0;
+#X connect 88 0 60 0;
+#X connect 98 0 45 0;
+#X connect 98 0 84 0;
+#X connect 98 1 18 0;
+#X connect 100 0 98 0;
+#X connect 101 0 98 0;
+#X connect 102 0 69 0;
+#X connect 102 1 85 0;
+#X connect 102 2 103 0;
+#X connect 102 3 104 0;
+#X connect 105 0 98 0;
diff --git a/arduino.pd b/arduino.pd
index 0b016b6..729fc35 100644
--- a/arduino.pd
+++ b/arduino.pd
@@ -1,10 +1,10 @@
-#N canvas 195 408 644 371 10;
+#N canvas 581 464 644 371 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 719 22 683 345 command 0;
+#N canvas 7 503 712 343 command 0;
#X obj 24 7 inlet;
#X obj 281 289 outlet;
#N canvas 729 244 503 311 digital-out 0;
@@ -45,7 +45,7 @@
#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;
+#X restore 326 122 pd digital-out;
#N canvas 310 221 540 347 pinMode 0;
#X obj 190 11 inlet;
#X obj 289 307 outlet;
@@ -75,7 +75,7 @@
#X connect 12 0 1 0;
#X connect 13 0 12 0;
#X connect 13 1 1 0;
-#X restore 280 93 pd pinMode;
+#X restore 238 94 pd pinMode;
#N canvas 300 373 372 380 pwm 0;
#X obj 44 14 inlet;
#X obj 44 312 outlet;
@@ -98,8 +98,8 @@
#X connect 8 0 6 2;
#X connect 9 0 6 1;
#X restore 24 94 pd pwm;
-#X msg 359 93 info;
-#X msg 471 132 249;
+#X msg 307 94 info;
+#X msg 420 136 249;
#N canvas 0 22 462 312 analogIns 0;
#X obj 64 7 inlet;
#X obj 69 263 outlet;
@@ -125,7 +125,7 @@
#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 restore 69 94 pd analogIns;
#N canvas 0 22 458 308 digitalIns 0;
#X obj 98 26 inlet;
#X obj 98 264 outlet;
@@ -141,13 +141,84 @@
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 1 0;
-#X restore 187 94 pd digitalIns;
+#X restore 150 94 pd digitalIns;
+#X obj 361 77 route digital version firmware;
+#X msg 479 136 240 \, 121 \, 247;
+#X obj 420 116 bang;
+#X obj 479 115 bang;
#X obj 24 51 route pwm analog analogIns digitalIns pinMode info;
-#X obj 412 91 route digital version firmware;
-#X msg 530 132 240 \, 121 \, 247;
-#X obj 471 112 bang;
-#X obj 530 111 bang;
-#X connect 0 0 9 0;
+#N canvas 624 420 451 466 sysex 0;
+#X obj 62 424 outlet;
+#X obj 28 22 inlet;
+#X obj 28 145 list split 1;
+#X obj 62 321 list prepend;
+#X obj 62 177 route bang;
+#X text 68 22 sysex;
+#X obj 250 22 inlet;
+#X text 286 21 string;
+#X obj 250 155 trigger anything bang;
+#X text 398 176 0x71;
+#X msg 373 177 113;
+#N canvas 366 192 467 461 split 0;
+#X text 87 12 Firmata sends 8-bit chars as two 7-bit bytes;
+#X obj 32 12 inlet;
+#X obj 50 422 outlet;
+#X obj 168 173 list;
+#X obj 50 361 mapping/tolist;
+#X obj 189 112 route bang;
+#X obj 189 137 bang;
+#X obj 32 311 trigger bang bang;
+#X obj 32 54 trigger bang anything;
+#X obj 155 89 list split 1;
+#X obj 110 208 trigger bang anything anything;
+#X text 256 191 LSB;
+#X obj 226 298 % 128;
+#X text 267 297 only 7-bits of data allowed;
+#X text 204 190 MSB;
+#X obj 198 234 >> 7;
+#X text 235 137 bang resets once finished;
+#X connect 1 0 8 0;
+#X connect 3 0 9 0;
+#X connect 4 0 2 0;
+#X connect 5 0 6 0;
+#X connect 5 1 3 1;
+#X connect 6 0 3 1;
+#X connect 7 0 4 0;
+#X connect 7 1 4 1;
+#X connect 8 0 7 0;
+#X connect 8 1 9 0;
+#X connect 9 0 10 0;
+#X connect 9 1 5 0;
+#X connect 10 0 3 0;
+#X connect 10 1 15 0;
+#X connect 10 2 12 0;
+#X connect 12 0 4 0;
+#X connect 15 0 12 0;
+#X restore 119 212 pd split into 7-bit bytes;
+#X obj 62 344 list prepend 240;
+#X text 168 345 0xF0 start_sysex;
+#X text 167 366 0xF7 end_sysex;
+#X obj 62 366 list append 247;
+#X obj 28 66 trigger anything anything;
+#X msg 175 87 \$1;
+#X connect 1 0 16 0;
+#X connect 2 1 4 0;
+#X connect 3 0 12 0;
+#X connect 4 0 3 0;
+#X connect 4 1 11 0;
+#X connect 6 0 8 0;
+#X connect 8 0 11 0;
+#X connect 8 1 10 0;
+#X connect 10 0 3 1;
+#X connect 11 0 3 0;
+#X connect 12 0 15 0;
+#X connect 15 0 0 0;
+#X connect 16 0 2 0;
+#X connect 16 1 17 0;
+#X connect 17 0 3 1;
+#X restore 572 136 pd sysex;
+#X obj 572 114 route sysex string;
+#X connect 0 0 13 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
@@ -155,20 +226,24 @@
#X connect 6 0 1 0;
#X connect 7 0 1 0;
#X connect 8 0 1 0;
-#X connect 9 0 4 0;
-#X connect 9 1 4 0;
-#X connect 9 2 7 0;
-#X connect 9 3 8 0;
-#X connect 9 4 3 0;
-#X connect 9 5 5 0;
-#X connect 9 6 10 0;
-#X connect 10 0 2 0;
-#X connect 10 1 12 0;
-#X connect 10 2 13 0;
-#X connect 10 3 1 0;
-#X connect 11 0 1 0;
-#X connect 12 0 6 0;
-#X connect 13 0 11 0;
+#X connect 9 0 2 0;
+#X connect 9 1 11 0;
+#X connect 9 2 12 0;
+#X connect 9 3 15 0;
+#X connect 10 0 1 0;
+#X connect 11 0 6 0;
+#X connect 12 0 10 0;
+#X connect 13 0 4 0;
+#X connect 13 1 4 0;
+#X connect 13 2 7 0;
+#X connect 13 3 8 0;
+#X connect 13 4 3 0;
+#X connect 13 5 5 0;
+#X connect 13 6 9 0;
+#X connect 14 0 1 0;
+#X connect 15 0 14 0;
+#X connect 15 1 14 1;
+#X connect 15 2 1 0;
#X restore 61 52 pd command processing;
#X obj 319 19 inlet;
#X text 306 1 raw input;
@@ -333,7 +408,7 @@
#X restore 372 170 pd analog messages;
#X obj 85 13 inlet;
#X msg 40 174 version \$2 \$1;
-#N canvas 518 166 492 456 sysex 0;
+#N canvas 921 447 492 456 sysex 0;
#X obj 77 20 inlet;
#X obj 77 407 outlet;
#N canvas 1036 237 450 300 firmware 0;