diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2008-04-11 22:08:18 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2008-04-11 22:08:18 +0000 |
commit | b5ddfbc4f01c27e2419f9fddcac614dec93d00a4 (patch) | |
tree | 1855b1a7f7795f58f61b504c1ee86c8be2691861 /arduino-test.pd | |
parent | 079e86651a3d9237b7a861489a26045f06521333 (diff) |
First stab at implementing v2 of the protocol, digitalWrite works, but no luck
yet with digital input. I am not sure if the problem is in Pd or Firmata.
svn path=/trunk/externals/hardware/arduino/; revision=9692
Diffstat (limited to 'arduino-test.pd')
-rw-r--r-- | arduino-test.pd | 244 |
1 files changed, 122 insertions, 122 deletions
diff --git a/arduino-test.pd b/arduino-test.pd index 97993b5..eaaf24a 100644 --- a/arduino-test.pd +++ b/arduino-test.pd @@ -1,4 +1,4 @@ -#N canvas 427 22 674 529 10; +#N canvas 274 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; @@ -50,7 +50,6 @@ #X coords 0 -1 1 1 136 17 1 60 60; #X restore 161 159 pd serin; #X text 158 141 serial port #; -#X text 420 493 released under the GNU GPL; #X msg 221 182 close; #X obj 532 320 tgl 15 0 empty empty changes 0 -6 0 8 -262144 -1 -1 0 1; @@ -60,11 +59,11 @@ 1 10 -225271 -1 -1 0 0; #X obj 277 322 tgl 15 1 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1; -#X obj 455 207 tgl 15 1 empty empty empty 0 -6 0 8 -257472 -1 -1 0 +#X obj 455 207 tgl 15 1 empty empty empty 0 -6 0 8 -257472 -1 -1 1 1; #X text 478 206 enable/disable digitalIns; #X msg 455 225 digitalIns \$1; -#X msg 455 183 analogIns 1 0; +#X msg 455 183 analogIns 5 0; #N canvas 162 133 610 460 serin 0; #X obj 59 337 outlet; #X obj 59 266 trigger bang anything; @@ -180,7 +179,7 @@ #X floatatom 252 436 5 0 0 3 a5 - -; #X text 300 301 <- argument sets port #; #X obj 40 81 hradio 15 1 0 14 empty empty empty 0 -6 0 8 -176124 -1 --1 0; +-1 3; #X text 148 67 7; #X text 42 67 0; #X text 189 67 10; @@ -236,7 +235,7 @@ #X connect 16 0 17 0; #X connect 17 0 14 0; #X restore 41 135 pd pwm; -#X msg 41 157 pwm 11 0; +#X msg 41 157 pwm 3 0; #X msg 319 175 info; #X msg 358 175 version; #X obj 230 322 spigot; @@ -255,24 +254,24 @@ Arduino (previously known as Pduino firmware).; #X obj 533 87 tgl 15 0 empty empty 12 0 -6 1 12 -260818 -1 -1 0 1; #X obj 550 87 tgl 15 0 empty empty 13 0 -6 1 12 -260818 -1 -1 0 1; #X text 328 54 turn on output mode for each pin (off=input); -#X msg 329 128 pinMode 12 1; +#X msg 329 128 pinMode 3 0; #N canvas 69 607 475 352 sending 0; #X obj 69 158 cnv 15 100 22 empty empty empty 20 12 0 14 -253938 -66577 0; #X obj 78 244 outlet; -#X msg 78 161 digital 12 0; +#X msg 78 161 digital 11 0; #X obj 197 98 tgl 15 0 empty empty 7 4 -6 1 12 -233017 -1 -1 0 1; #X obj 214 98 tgl 15 0 empty empty 8 4 -6 1 12 -233017 -1 -1 0 1; #X obj 231 98 tgl 15 0 empty empty 9 4 -6 1 12 -233017 -1 -1 0 1; -#X obj 248 98 tgl 15 0 empty empty 10 0 -6 1 12 -233017 -1 -1 0 1; +#X obj 248 98 tgl 15 0 empty empty 10 0 -6 1 12 -233017 -1 -1 1 1; #X obj 265 98 tgl 15 0 empty empty 11 0 -6 1 12 -233017 -1 -1 0 1; -#X obj 282 98 tgl 15 0 empty empty 12 0 -6 1 12 -233017 -1 -1 0 1; +#X obj 282 98 tgl 15 0 empty empty 12 0 -6 1 12 -233017 -1 -1 1 1; #X obj 299 98 tgl 15 0 empty empty 13 0 -6 1 12 -233017 -1 -1 0 1; #X obj 112 98 tgl 15 0 empty empty 2 4 -6 1 12 -233017 -1 -1 0 1; #X obj 129 98 tgl 15 0 empty empty 3 4 -6 1 12 -233017 -1 -1 0 1; #X obj 146 98 tgl 15 0 empty empty 4 4 -6 1 12 -233017 -1 -1 0 1; #X obj 163 98 tgl 15 0 empty empty 5 4 -6 1 12 -233017 -1 -1 0 1; -#X obj 180 98 tgl 15 0 empty empty 6 4 -6 1 12 -233017 -1 -1 0 1; +#X obj 180 98 tgl 15 0 empty empty 6 4 -6 1 12 -233017 -1 -1 1 1; #N canvas 314 233 679 330 generate 0; #X obj 42 24 inlet; #X obj 82 24 inlet; @@ -430,22 +429,22 @@ 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 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; -#X obj 462 458 tgl 15 0 empty empty 4 4 23 1 12 -232448 -1 -1 0 1; -#X obj 479 458 tgl 15 0 empty empty 5 4 23 1 12 -232448 -1 -1 0 1; -#X obj 496 458 tgl 15 0 empty empty 6 4 23 1 12 -232448 -1 -1 0 1; -#X obj 513 458 tgl 15 0 empty empty 7 4 23 1 12 -232448 -1 -1 0 1; -#X obj 530 458 tgl 15 0 empty empty 8 4 23 1 12 -232448 -1 -1 0 1; -#X obj 547 458 tgl 15 0 empty empty 9 4 23 1 12 -232448 -1 -1 0 1; -#X obj 564 458 tgl 15 0 empty empty 10 0 23 1 12 -232448 -1 -1 0 1 +#X obj 397 443 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13; +#X obj 428 465 tgl 15 0 empty empty 2 4 23 1 12 -232448 -1 -1 0 1; +#X obj 445 465 tgl 15 0 empty empty 3 4 23 1 12 -232448 -1 -1 0 1; +#X obj 462 465 tgl 15 0 empty empty 4 4 23 1 12 -232448 -1 -1 0 1; +#X obj 479 465 tgl 15 0 empty empty 5 4 23 1 12 -232448 -1 -1 0 1; +#X obj 496 465 tgl 15 0 empty empty 6 4 23 1 12 -232448 -1 -1 0 1; +#X obj 513 465 tgl 15 0 empty empty 7 4 23 1 12 -232448 -1 -1 1 1; +#X obj 530 465 tgl 15 0 empty empty 8 4 23 1 12 -232448 -1 -1 1 1; +#X obj 547 465 tgl 15 0 empty empty 9 4 23 1 12 -232448 -1 -1 0 1; +#X obj 564 465 tgl 15 0 empty empty 10 0 23 1 12 -232448 -1 -1 0 1 ; -#X obj 581 458 tgl 15 0 empty empty 11 0 23 1 12 -232448 -1 -1 0 1 +#X obj 581 465 tgl 15 0 empty empty 11 0 23 1 12 -232448 -1 -1 0 1 ; -#X obj 598 458 tgl 15 0 empty empty 12 0 23 1 12 -232448 -1 -1 0 1 +#X obj 598 465 tgl 15 0 empty empty 12 0 23 1 12 -232448 -1 -1 0 1 ; -#X obj 615 458 tgl 15 0 empty empty 13 0 23 1 12 -232448 -1 -1 0 1 +#X obj 615 465 tgl 15 0 empty empty 13 0 23 1 12 -232448 -1 -1 0 1 ; #N canvas 0 22 454 304 raw 0; #X obj 96 231 outlet; @@ -455,29 +454,29 @@ 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 empty 4 10 0 12 --203904 -1 0; +#X obj 250 100 cnv 15 145 17 empty \$0-version_cnv Firmata-2.0 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; #X obj 48 103 symbol; #X obj 38 77 loadbang; #X msg 96 78 bang; #X obj 23 29 route version; #X obj 309 163 outlet; -#X connect 0 0 8 0; +#X obj 23 52 zexy/makesymbol Firmata-%s.%s; +#X connect 0 0 7 0; #X connect 3 0 2 0; #X connect 4 0 3 0; -#X connect 5 0 3 0; -#X connect 6 0 5 0; -#X connect 7 0 5 0; -#X connect 8 0 4 0; -#X connect 8 1 9 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 9 0; +#X connect 7 1 8 0; +#X connect 9 0 3 0; #X coords 0 -1 1 1 145 17 1 250 100; #X restore 67 319 pd ver; -#X obj 456 399 unpack 0 0; -#X floatatom 456 419 5 0 0 0 - - -; -#X floatatom 513 419 5 0 0 0 - - -; +#X obj 414 403 unpack 0 0; +#X floatatom 414 423 5 0 0 0 - - -; +#X floatatom 471 423 5 0 0 0 - - -; #N canvas 163 104 700 327 send-to-arduino------------------- 0; #X obj 49 24 inlet; #X obj 89 24 inlet; @@ -544,11 +543,11 @@ Arduino (previously known as Pduino firmware).; #X connect 30 0 31 0; #X connect 31 0 29 0; #X restore 329 106 pd send-to-arduino-------------------; -#X obj 394 458 tgl 15 0 empty empty 0 4 23 1 12 -232448 -1 -1 0 1; -#X obj 411 458 tgl 15 0 empty empty 1 4 23 1 12 -232448 -1 -1 0 1; -#X obj 394 458 cnv 15 15 15 empty empty Rx 1 10 0 11 -128992 -86277 +#X obj 394 465 tgl 15 0 empty empty 0 4 23 1 12 -232448 -1 -1 0 1; +#X obj 411 465 tgl 15 0 empty empty 1 4 23 1 12 -232448 -1 -1 0 1; +#X obj 394 465 cnv 15 15 15 empty empty Rx 1 10 0 11 -128992 -86277 0; -#X obj 411 458 cnv 15 15 15 empty empty Tx 1 10 0 11 -128992 -13381 +#X obj 411 465 cnv 15 15 15 empty empty Tx 1 10 0 11 -128992 -13381 0; #X obj 329 87 tgl 15 0 empty empty 0 3 -6 1 12 -260818 -1 -1 0 1; #X obj 346 87 tgl 15 0 empty empty 1 3 -6 1 12 -260818 -1 -1 0 1; @@ -560,8 +559,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 empty 4 10 0 12 --232576 -66577 0; +#X obj 250 100 cnv 15 145 17 empty \$0-firmware_cnv Standard_Firmata-2.0 +4 10 0 12 -232576 -66577 0; #X msg 123 152 label \$1; #X obj 148 123 symbol; #X obj 138 97 loadbang; @@ -586,27 +585,26 @@ Arduino (previously known as Pduino firmware).; #X restore 67 339 pd firmware; #X msg 358 215 devices; #X msg 358 195 firmware; -#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; +#X restore 482 403 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 obj 210 54 print sysex; #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; +#X restore 547 403 pd Marg; #N canvas 284 22 487 372 strings 0; #X obj -178 287 outlet; #X obj -142 101 moocow/any2string; @@ -640,81 +638,83 @@ Arduino (previously known as Pduino firmware).; #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 obj 397 379 route digital version string sysex; +#X text 397 493 released under the GNU GPL v2 or later; +#X connect 4 0 97 0; #X connect 5 0 4 0; -#X connect 5 1 8 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 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 98 0; -#X connect 43 0 98 0; -#X connect 44 0 98 0; -#X connect 45 0 66 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 5 1 7 0; +#X connect 7 0 97 0; +#X connect 8 0 17 2; +#X connect 9 0 17 1; +#X connect 10 0 40 1; +#X connect 11 0 44 1; +#X connect 12 0 14 0; +#X connect 14 0 97 0; +#X connect 15 0 97 0; +#X connect 16 0 15 0; +#X connect 25 0 40 0; +#X connect 40 0 41 0; +#X connect 41 0 97 0; +#X connect 42 0 97 0; +#X connect 43 0 97 0; +#X connect 44 0 65 0; +#X connect 46 0 87 2; +#X connect 47 0 87 3; +#X connect 48 0 87 4; +#X connect 49 0 87 5; +#X connect 50 0 87 6; +#X connect 51 0 87 7; +#X connect 52 0 87 8; +#X connect 53 0 87 9; +#X connect 54 0 87 10; +#X connect 55 0 87 11; +#X connect 56 0 87 12; +#X connect 57 0 87 13; +#X connect 59 0 97 0; +#X connect 60 0 97 0; +#X connect 61 0 60 0; +#X connect 65 0 66 0; +#X connect 65 1 104 0; #X connect 66 0 67 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; -#X connect 67 3 68 3; -#X connect 67 4 68 4; -#X connect 67 5 68 5; -#X connect 67 6 68 6; -#X connect 67 7 68 7; -#X connect 68 0 19 0; -#X connect 68 1 20 0; -#X connect 68 2 21 0; -#X connect 68 3 22 0; -#X connect 68 4 23 0; -#X connect 68 5 24 0; -#X connect 68 6 64 0; -#X connect 68 7 65 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; +#X connect 66 1 67 1; +#X connect 66 2 67 2; +#X connect 66 3 67 3; +#X connect 66 4 67 4; +#X connect 66 5 67 5; +#X connect 66 6 67 6; +#X connect 66 7 67 7; +#X connect 67 0 18 0; +#X connect 67 1 19 0; +#X connect 67 2 20 0; +#X connect 67 3 21 0; +#X connect 67 4 22 0; +#X connect 67 5 23 0; +#X connect 67 6 63 0; +#X connect 67 7 64 0; +#X connect 68 2 69 0; +#X connect 68 3 70 0; +#X connect 68 4 71 0; +#X connect 68 5 72 0; +#X connect 68 6 73 0; +#X connect 68 7 74 0; +#X connect 68 8 75 0; +#X connect 68 9 76 0; +#X connect 68 10 77 0; +#X connect 68 11 78 0; +#X connect 68 12 79 0; +#X connect 68 13 80 0; +#X connect 81 0 97 1; +#X connect 83 0 98 0; +#X connect 84 0 85 0; +#X connect 84 1 86 0; +#X connect 87 0 59 0; +#X connect 97 0 44 0; +#X connect 97 0 83 0; +#X connect 97 1 17 0; +#X connect 99 0 97 0; +#X connect 100 0 97 0; +#X connect 103 0 97 0; +#X connect 104 0 68 0; +#X connect 104 1 84 0; +#X connect 104 2 101 0; +#X connect 104 3 102 0; |