aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/LED-lighting-fade.pd80
-rw-r--r--examples/simple_input.pd20
2 files changed, 100 insertions, 0 deletions
diff --git a/examples/LED-lighting-fade.pd b/examples/LED-lighting-fade.pd
new file mode 100644
index 0000000..2476af7
--- /dev/null
+++ b/examples/LED-lighting-fade.pd
@@ -0,0 +1,80 @@
+#N canvas 104 22 702 588 12;
+#X declare -lib mapping;
+#X obj 357 466 arduino 2;
+#X msg 418 219 pinMode 5 3;
+#X obj 41 310 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 1200 1;
+#X floatatom 49 346 5 0 0 0 - - -;
+#X obj 197 302 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 700 1;
+#X floatatom 201 322 5 0 0 0 - - -;
+#X obj 195 463 pddp/print;
+#X obj 118 56 float;
+#X obj 177 57 + 1;
+#X obj 117 28 metro 100;
+#X obj 117 5 tgl 15 0 empty empty empty 17 7 0 10 -204786 -1 -1 0 1
+;
+#X obj 118 91 % 30;
+#X floatatom 131 121 5 0 0 0 - - -;
+#X obj 118 146 autoscale;
+#X obj 38 230 disjoin;
+#X obj 84 257 reverse;
+#X obj 194 230 disjoin;
+#X obj 240 255 reverse;
+#X obj 310 151 hsl 50 15 0 1 0 1 \$0-x-slider \$0-x-slider-receive
+x 5 9 0 11 -232576 -1 -1 1300 0;
+#X floatatom 327 171 7 0 0 0 - - -;
+#X obj 194 201 exponential_sigmoid;
+#X obj 498 -42 import mapping;
+#X msg 424 42 devices;
+#X msg 429 83 open 4;
+#X text 483 41 1) click this message to get;
+#X text 485 58 the number of your arduino;
+#X text 483 83 2) put your arduino # here;
+#X text 484 103 and click this message;
+#X text 438 135 3) wait for a few seconds for your;
+#X text 438 153 arduino to reboot \, then click both;
+#X text 438 171 of the messages below to configure;
+#X text 438 190 your arduino;
+#X text 515 217 (set pin 5 to PWM mode);
+#X text 138 2 4) click this to start the LEDs-a-pulsing;
+#X text 225 128 of the pulsing;
+#X text 225 114 5) adjust the curve;
+#X msg 421 246 pinMode 6 3;
+#X text 515 247 (set pin 6 to PWM mode);
+#X text 28 -52 This example patch requires an Arduino and two LEDs.
+Plug in the LEDs into pins 5 and 6 on your Arduino.;
+#X msg 40 372 pwm 5 \$1;
+#X obj 195 351 prepend pwm 6;
+#X obj 40 463 pddp/print;
+#X text 48 435 see the messages:;
+#X connect 1 0 0 0;
+#X connect 2 0 39 0;
+#X connect 2 0 3 0;
+#X connect 4 0 5 0;
+#X connect 4 0 40 0;
+#X connect 7 0 8 0;
+#X connect 7 0 11 0;
+#X connect 8 0 7 1;
+#X connect 9 0 7 0;
+#X connect 10 0 9 0;
+#X connect 11 0 12 0;
+#X connect 11 0 13 0;
+#X connect 13 0 14 0;
+#X connect 13 0 20 0;
+#X connect 14 0 2 0;
+#X connect 14 1 15 0;
+#X connect 15 0 2 0;
+#X connect 16 0 4 0;
+#X connect 16 1 17 0;
+#X connect 17 0 4 0;
+#X connect 18 0 19 0;
+#X connect 18 0 20 1;
+#X connect 20 0 16 0;
+#X connect 22 0 0 0;
+#X connect 23 0 0 0;
+#X connect 36 0 0 0;
+#X connect 39 0 0 0;
+#X connect 39 0 41 0;
+#X connect 40 0 6 0;
+#X connect 40 0 0 0;
diff --git a/examples/simple_input.pd b/examples/simple_input.pd
new file mode 100644
index 0000000..55d5827
--- /dev/null
+++ b/examples/simple_input.pd
@@ -0,0 +1,20 @@
+#N canvas 194 50 450 300 10;
+#X obj 114 139 arduino;
+#X msg 114 54 pinMode 5 0;
+#X msg 130 82 digitalIns 0 1;
+#X msg 144 112 analogIns 0 1;
+#X obj 114 167 route digital analog;
+#X msg 90 29 open 0;
+#X obj 172 192 route 0;
+#X obj 172 215 print Analog pin 0 value is;
+#X obj 114 238 print Digital pin 5 is;
+#X obj 114 203 route 5;
+#X connect 0 0 4 0;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 9 0;
+#X connect 4 1 6 0;
+#X connect 5 0 0 0;
+#X connect 6 0 7 0;
+#X connect 9 0 8 0;