aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-09-04 07:44:29 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-09-04 07:44:29 +0000
commit87d663f1641f8d14b7becbc8c32d1fc854596b01 (patch)
tree7366dbe93d52e41977dce96d7a864a1ab1727187
parentfc002eadfd81a8556b2e20681ed4e3a6d9e1f754 (diff)
switched to default to output mode so that you don't see voltage float on disconnected pins; changed test patch init settings to reflect initial state of arduino
svn path=/trunk/externals/hardware/arduino/; revision=5865
-rw-r--r--Pd_firmware/Pd_firmware.pde2
-rw-r--r--arduino-test.pd122
2 files changed, 57 insertions, 67 deletions
diff --git a/Pd_firmware/Pd_firmware.pde b/Pd_firmware/Pd_firmware.pde
index 1d64867..41df42e 100644
--- a/Pd_firmware/Pd_firmware.pde
+++ b/Pd_firmware/Pd_firmware.pde
@@ -409,7 +409,7 @@ void setup() {
beginSerial(19200);
for(i=0; i<TOTAL_DIGITAL_PINS; ++i) {
- setPinMode(i,INPUT);
+ setPinMode(i,OUTPUT);
}
}
diff --git a/arduino-test.pd b/arduino-test.pd
index 124311c..088815f 100644
--- a/arduino-test.pd
+++ b/arduino-test.pd
@@ -1,4 +1,4 @@
-#N canvas 264 99 695 570 10;
+#N canvas 124 74 691 566 10;
#X msg 166 173 open 3;
#N canvas 627 365 360 384 serin 0;
#X obj 180 61 cnv 15 15 15 empty \$0-number-canvas 3 4 8 0 14 -233017
@@ -29,16 +29,15 @@
#X coords 0 -1 1 1 136 17 1 60 60;
#X restore 166 150 pd serin;
#X text 163 132 serial port #;
-#X text 424 528 released under the GNU GPL;
-#X text 7 526 (C) Copyright 2006 Hans-Christoph Steiner <hans@at.or.at>
+#X text 424 508 released under the GNU GPL;
+#X text 7 506 (C) Copyright 2006 Hans-Christoph Steiner <hans@at.or.at>
;
#X msg 226 173 close;
-#X obj 63 497 print --------------------;
#X obj 434 321 tgl 15 0 empty empty changes 0 -6 0 8 -262144 -1 -1
0 1;
#X obj 353 61 hradio 15 1 0 14 empty empty empty 0 -6 0 8 -262131 -1
--1 13;
-#X obj 330 62 tgl 15 0 empty empty empty 0 -6 0 8 -262131 -1 -1 0 1
+-1 0;
+#X obj 330 62 tgl 15 0 empty empty empty 0 -6 0 8 -262131 -1 -1 1 1
;
#X obj 373 321 tgl 15 0 empty empty all 0 -6 0 8 -262144 -1 -1 0 1
;
@@ -116,10 +115,9 @@
#X connect 24 0 13 0;
#X connect 25 0 14 0;
#X connect 26 0 15 0;
-#X restore 473 507 pd decode buttons;
+#X restore 471 486 pd decode buttons;
#X obj 93 89 hsl 150 17 0 1 0 0 empty empty PWM_control_(0-1) -2 -6
-1 10 -225271 -1 -1 1700 0;
-#X msg 64 472 bang;
+1 10 -225271 -1 -1 0 0;
#X text 461 47 7;
#X text 355 47 0;
#X text 502 47 10;
@@ -130,18 +128,18 @@
;
#X obj 435 422 route digital;
#X obj 521 442 print GARBAGE;
-#X floatatom 430 507 6 0 0 0 - - -;
+#X floatatom 424 488 6 0 0 0 - - -;
#X text 329 127 how many analogIns to enable:;
#X obj 330 188 tgl 15 1 empty empty empty 0 -6 0 8 -257472 -1 -1 1
1;
#X text 353 187 enable/disable digitalIns;
#X msg 330 206 digitalIns \$1;
-#X msg 330 164 analogIns 0;
+#X msg 330 164 analogIns 6;
#N canvas 162 133 570 420 serin 0;
-#X obj 165 61 cnv 15 15 15 empty \$0-analog-number-canvas 0 4 8 0 14
+#X obj 165 61 cnv 15 15 15 empty \$0-analog-number-canvas 6 4 8 0 14
-233017 -1 0;
#X obj 60 61 hradio 15 1 1 7 empty empty empty 0 -6 0 8 -225280 -1
--1 0;
+-1 6;
#X obj 60 13 inlet;
#X msg 200 202 label \$1;
#X obj 200 180 makefilename %d;
@@ -167,10 +165,6 @@
#X restore 330 144 pd serin;
#X text 546 47 13;
#X text 328 33 turn on output mode for each pin (off = input);
-#X obj 367 481 spigot;
-#X obj 400 463 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 367 502 print;
#N canvas 0 22 269 256 speed 0;
#X obj 21 41 inlet;
#X obj 21 62 maxlib/speedlim 100;
@@ -250,7 +244,7 @@ the CPU;
#X text 429 47 5;
#X text 444 47 6;
#X text 400 47 3;
-#X msg 330 103 outputMode 13 0;
+#X msg 330 103 outputMode 0 1;
#N canvas 304 39 554 377 sending 0;
#X obj 167 325 outlet;
#X obj 49 64 tgl 15 0 empty empty 0 4 -6 1 12 -233017 -1 -1 0 1;
@@ -272,7 +266,7 @@ bits of digital output values per byte.;
#X obj 167 140 trigger bang float;
#X obj 167 105 mapping/bytemask;
#X obj 48 105 mapping/bytemask;
-#X obj 380 175 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 16383
+#X obj 380 175 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0
16383;
#X obj 380 138 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
16383;
@@ -317,7 +311,7 @@ bits of digital output values per byte.;
#X text 531 47 12;
#X text 370 47 1;
#X obj 35 61 hradio 15 1 0 14 empty empty empty 0 -6 0 8 -176124 -1
--1 5;
+-1 0;
#X text 143 47 7;
#X text 37 47 0;
#X text 184 47 10;
@@ -403,50 +397,46 @@ Arduino.;
#X obj 20 230 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 16383
;
#X text 38 229 pulse all outputs;
-#X connect 0 0 76 0;
+#X connect 0 0 71 0;
#X connect 1 0 0 0;
-#X connect 5 0 76 0;
-#X connect 7 0 35 2;
-#X connect 8 0 75 1;
-#X connect 9 0 75 0;
-#X connect 10 0 35 1;
-#X connect 12 0 73 1;
-#X connect 13 0 6 0;
-#X connect 17 0 19 0;
-#X connect 18 0 17 1;
-#X connect 19 0 34 0;
-#X connect 19 1 34 1;
-#X connect 19 2 34 2;
-#X connect 19 3 34 3;
-#X connect 19 4 34 4;
-#X connect 19 5 34 5;
-#X connect 19 6 34 6;
-#X connect 20 0 11 0;
-#X connect 20 0 22 0;
-#X connect 20 0 31 0;
-#X connect 20 1 21 0;
-#X connect 24 0 26 0;
-#X connect 26 0 76 0;
-#X connect 27 0 76 0;
-#X connect 28 0 27 0;
-#X connect 31 0 33 0;
-#X connect 32 0 31 1;
-#X connect 34 0 37 0;
-#X connect 34 1 38 0;
-#X connect 34 2 39 0;
-#X connect 34 3 40 0;
-#X connect 34 4 41 0;
-#X connect 34 5 42 0;
-#X connect 34 6 20 0;
-#X connect 48 0 76 0;
-#X connect 49 0 76 0;
-#X connect 50 0 76 1;
-#X connect 52 0 73 1;
-#X connect 58 0 73 0;
-#X connect 73 0 74 0;
-#X connect 74 0 76 0;
-#X connect 75 0 48 0;
-#X connect 76 0 17 0;
-#X connect 76 1 35 0;
-#X connect 78 0 76 0;
-#X connect 79 0 49 0;
+#X connect 5 0 71 0;
+#X connect 6 0 30 2;
+#X connect 7 0 70 1;
+#X connect 8 0 70 0;
+#X connect 9 0 30 1;
+#X connect 11 0 68 1;
+#X connect 15 0 17 0;
+#X connect 16 0 15 1;
+#X connect 17 0 29 0;
+#X connect 17 1 29 1;
+#X connect 17 2 29 2;
+#X connect 17 3 29 3;
+#X connect 17 4 29 4;
+#X connect 17 5 29 5;
+#X connect 17 6 29 6;
+#X connect 18 0 10 0;
+#X connect 18 0 20 0;
+#X connect 18 1 19 0;
+#X connect 22 0 24 0;
+#X connect 24 0 71 0;
+#X connect 25 0 71 0;
+#X connect 26 0 25 0;
+#X connect 29 0 32 0;
+#X connect 29 1 33 0;
+#X connect 29 2 34 0;
+#X connect 29 3 35 0;
+#X connect 29 4 36 0;
+#X connect 29 5 37 0;
+#X connect 29 6 18 0;
+#X connect 43 0 71 0;
+#X connect 44 0 71 0;
+#X connect 45 0 71 1;
+#X connect 47 0 68 1;
+#X connect 53 0 68 0;
+#X connect 68 0 69 0;
+#X connect 69 0 71 0;
+#X connect 70 0 43 0;
+#X connect 71 0 15 0;
+#X connect 71 1 30 0;
+#X connect 73 0 71 0;
+#X connect 74 0 44 0;