Skip to content
Snippets Groups Projects
Commit d43bbd78 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

ported: "*revamped arduino connectivity to use Firmata firmware and allow for"

from pd-l2ork: 70b9043e6cd6de914379d77f591b57e2c9a34661
parent aa3fb521
No related branches found
No related tags found
No related merge requests found
Showing with 708 additions and 7 deletions
#N canvas 210 47 508 474 10;
#X obj 375 -29 preset_hub k12 %hidden% %node% 2 5 5 %node% 2 6 7 %node%
2 6 7 %node% 2 7 5 %node% 2 7 18 %node% 2 8 4 %node% 2 8 4;
#X obj 138 151 cnv 15 475 167 empty empty empty 20 12 0 14 -233017
-66577 0;
#X obj 123 -7 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407
0;
#X obj 123 -35 cnv 15 501 28 empty empty Arduino/AnalogIn 5 14 0 20
-139274 -262144 0;
#X obj 594 -4 ggee/image @pd_extra/K12/icons/l2ork.png 0;
#N canvas 492 154 385 225 META 0;
#X text 8 38 INLET_0 Connect the Arduino Connect object to this inlet
;
#X text 7 58 OUTLET_0 Connect this to any object where you wish to
pass the captured sensor data (e.g. a math object or an instrument)
;
#X text 6 5 DESCRIPTION Use this object to get the analog data from
the specified Arduino Uno analog pin;
#X restore 571 409 pd META;
#X obj 144 347 K12/math_number;
#X obj 144 32 K12/arduino_connect;
#X obj 144 158 K12/arduino_analog_in;
#X text 242 159 The Arcduino Analog In object takes in the analog pin
data (A0 \, A1 \, A2 \, A3 \, A4 \, and A5) coming from the Arduino
Uno. You can specify pin by clicking on the pin entry box \, typing
the value (e.g. A0) \, and pressing enter/return. Connect the Arduino
Connect object to the inlet. Connect the outlet to wherever you wish
to send captured pin data (e.g. a math object or an instrument). The
outputting data range is between 0 and 1. Object's color will change
from red to Arduino bluish-green indicating valid pin selection.;
#X connect 7 0 8 0;
#X connect 8 0 6 0;
#N canvas 291 41 496 325 10;
#X obj 110 64 outlet;
#X obj 228 45 ggee/image @pd_extra/K12/objects/sarcduino_analog_off.png
1;
#X obj 228 -60 loadbang;
#X obj 58 -60 inlet;
#X obj 240 -15 preset_node k12;
#X obj 110 8 route a;
#X obj 58 -15 route arduino list;
#X obj 77 183 gate 1 0;
#X obj 58 105 t b 1 f;
#X obj 122 162 f, f 2;
#X obj 224 160 change;
#X msg 224 182 symbol arduino-\$1;
#X symbolatom 228 62 3 0 0 0 - - -, f 3;
#X text 203 61 pin:;
#N canvas 330 227 755 313 pin_parser 0;
#X obj 18 18 inlet;
#X obj 148 202 outlet;
#X obj 306 275 outlet;
#X msg 18 67 14;
#X msg 85 67 15;
#X msg 153 67 16;
#X msg 220 67 17;
#X msg 288 67 18;
#X msg 355 67 19;
#X obj 307 198 t b;
#X obj 423 198 t b;
#X msg 307 250 open @pd_extra/K12/objects/sarcduino_analog.png;
#X msg 423 220 open @pd_extra/K12/objects/sarcduino_analog_off.png
;
#X obj 18 45 sel A0 A1 A2 A3 A4 A5, f 68;
#X connect 0 0 13 0;
#X connect 3 0 1 0;
#X connect 3 0 9 0;
#X connect 4 0 1 0;
#X connect 4 0 9 0;
#X connect 5 0 1 0;
#X connect 5 0 9 0;
#X connect 6 0 1 0;
#X connect 6 0 9 0;
#X connect 7 0 1 0;
#X connect 7 0 9 0;
#X connect 8 0 1 0;
#X connect 8 0 9 0;
#X connect 9 0 11 0;
#X connect 10 0 12 0;
#X connect 11 0 2 0;
#X connect 12 0 2 0;
#X connect 13 0 3 0;
#X connect 13 1 4 0;
#X connect 13 2 5 0;
#X connect 13 3 6 0;
#X connect 13 4 7 0;
#X connect 13 5 8 0;
#X connect 13 6 10 0;
#X restore 277 104 pd pin_parser;
#X obj 110 41 route -1;
#X msg 77 205 pinMode $f1 analog;
#X obj 77 235 send, f 25;
#X obj 340 -15 loadbang;
#X msg 340 7 symbol ---;
#X text 209 45 INPUT;
#X msg 228 -37 open @pd_extra/K12/objects/sarcduino_analog_off.png
;
#X connect 2 0 21 0;
#X connect 3 0 6 0;
#X connect 4 0 12 0;
#X connect 5 0 15 0;
#X connect 6 0 8 0;
#X connect 6 1 5 0;
#X connect 7 0 16 0;
#X connect 8 0 9 0;
#X connect 8 1 7 0;
#X connect 8 2 10 0;
#X connect 9 0 7 1;
#X connect 10 0 11 0;
#X connect 11 0 17 1;
#X connect 12 0 14 0;
#X connect 14 0 9 0;
#X connect 14 0 15 1;
#X connect 14 1 1 0;
#X connect 15 0 0 0;
#X connect 16 0 17 0;
#X connect 18 0 19 0;
#X connect 19 0 12 0;
#X connect 21 0 1 0;
#X coords 0 -1 1 1 89 89 2 183 13;
#N canvas 286 58 508 537 10;
#X obj 375 -29 preset_hub k12 %hidden% %node% 2 5 5 %node% 2 6 7 %node%
2 6 7 %node% 2 7 5 %node% 2 7 18 %node% 2 8 4 %node% 2 8 4 %node% 2
8 4;
#X obj 139 119 cnv 15 473 210 empty empty empty 20 12 0 14 -233017
-66577 0;
#X obj 123 -7 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407
0;
#X obj 123 -35 cnv 15 501 28 empty empty Arduino/DigitalOut 5 14 0
20 -139274 -262144 0;
#X obj 594 -4 ggee/image @pd_extra/K12/icons/l2ork.png 0;
#N canvas 482 144 385 225 META 0;
#X text 8 38 INLET_0 Connect the data stream you wish to send to Arduino
;
#X text 7 58 OUTLET_0 Connect to Arduino Connect object's inlet;
#X text 6 5 DESCRIPTION Use this object to send analog data (between
0 and 1) to the specified Arduino Uno pin;
#X restore 571 473 pd META;
#X obj 147 40 K12/math_number;
#X obj 147 358 K12/arduino_connect;
#X obj 147 127 K12/arduino_analog_out;
#X text 245 128 The Arcduino Analog Out object takes in the incoming
analog data with a range betwen 0 and 1 and sends it to a desired Arduino
digital pin that is PWM enabled (the pin has a ~ next to the pin number).
You can specify pin 3 \, 5 \, 6 \, 9 \, 10 \, and 11 (default -1=off)
by clicking on the pin number and dragging it up and down or by clicking
onto the number \, typing the value \, and pressing enter/return. Connect
the data stream with values between 0 and 1 that you wish to send to
the pin into object's inlet. Connect the outlet to the Arduino Connect's
inlet. Object's color will change from red to Aruino bluish-green
indicating valid pin selection (e.g. not all pins allow for PWM analog
output)., f 59;
#X connect 6 0 8 0;
#X connect 8 0 7 0;
#N canvas 422 148 500 325 10;
#X obj 58 238 outlet;
#X obj 228 45 ggee/image @pd_extra/K12/objects/sarcduino_analog_off.png
1;
#X obj 228 -60 loadbang;
#X obj 58 -60 inlet;
#X obj 240 -15 preset_node k12;
#X text 206 62 pin:;
#N canvas 372 122 621 425 pin_parser 0;
#X obj 93 35 inlet;
#X obj 93 123 select 3 5 6 9 10 11, f 44;
#X obj 114 280 outlet;
#X obj 273 369 outlet;
#X msg 93 145 3;
#X msg 136 145 5;
#X msg 180 145 6;
#X msg 223 145 9;
#X msg 267 145 10;
#X msg 310 145 11;
#X obj 273 276 t b;
#X obj 354 276 t b;
#X msg 354 298 open @pd_extra/K12/objects/sarcduino_analog_off.png
;
#X msg 273 338 open @pd_extra/K12/objects/sarcduino_analog.png;
#X connect 0 0 1 0;
#X connect 1 0 4 0;
#X connect 1 1 5 0;
#X connect 1 2 6 0;
#X connect 1 3 7 0;
#X connect 1 4 8 0;
#X connect 1 5 9 0;
#X connect 1 6 11 0;
#X connect 4 0 2 0;
#X connect 4 0 10 0;
#X connect 5 0 2 0;
#X connect 5 0 10 0;
#X connect 6 0 2 0;
#X connect 6 0 10 0;
#X connect 7 0 2 0;
#X connect 7 0 10 0;
#X connect 8 0 2 0;
#X connect 8 0 10 0;
#X connect 9 0 2 0;
#X connect 9 0 10 0;
#X connect 10 0 13 0;
#X connect 11 0 12 0;
#X connect 12 0 3 0;
#X connect 13 0 3 0;
#X restore 277 104 pd pin_parser;
#X msg 304 153 pinMode \$1 pwm;
#X obj 277 126 t f f;
#X msg 58 184 pwm \$2 \$1;
#X obj 58 161 pack 0 0;
#X text 208 46 OUTPUT;
#X obj 230 65 nbx 3 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 -1 256 3;
#X msg 228 -37 open @pd_extra/K12/objects/sarcduino_analog_off.png
;
#X connect 2 0 13 0;
#X connect 3 0 10 0;
#X connect 4 0 12 0;
#X connect 6 0 8 0;
#X connect 6 1 1 0;
#X connect 7 0 0 0;
#X connect 8 0 10 1;
#X connect 8 1 7 0;
#X connect 9 0 0 0;
#X connect 10 0 9 0;
#X connect 12 0 6 0;
#X connect 13 0 1 0;
#X coords 0 -1 1 1 89 89 2 183 13;
#N canvas 191 38 507 650 10;
#X obj 348 51 cnv 15 250 117 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 366 -26 preset_hub k12 %hidden% %node% 2 7 18 %preset% 0 0 %node%
2 9 4 %preset% 0 a0 %node% 2 9 4 %preset% 0 a0 %node% 2 10 4 %preset%
0 2 %node% 2 11 4 %preset% 0 10 %node% 2 12 4 %preset% 0 4 %node% 2
13 7 %node% 2 14 7 %node% 2 15 7 %node% 2 16 7 %node% 2 17 8;
#X obj 124 218 cnv 15 474 194 empty empty empty 20 12 0 14 -233017
-66577 0;
#X obj 112 -3 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407
0;
#X obj 112 -31 cnv 15 501 28 empty empty Arduino/Connect 5 14 0 20
-139274 -262144 0;
#X obj 583 0 ggee/image @pd_extra/K12/icons/l2ork.png 0;
#N canvas 534 463 389 163 META 0;
#X text 6 5 DESCRIPTION This is used to connect the Arduino to the
patch. Connect the Arudino to the computer via USB wire and then enter
device number to connect.;
#X text 6 97 OUTLET_0 Connect this to one of the Arduino input objects
(Analog or Digital);
#X text 6 57 INLET_0 Connect one of the Arduino output objects (Analog
or Digital) to this inlet;
#X restore 557 956 pd META;
#X obj 131 225 K12/arduino_connect;
#X obj 360 790 ggee/image @pd_extra/K12/images/arduino_uno.png 0;
#X obj 239 440 K12/arduino_analog_in;
#X obj 131 440 K12/arduino_digital_in;
#X obj 239 111 K12/arduino_analog_out;
#X obj 131 111 K12/arduino_digital_out;
#X obj 131 25 K12/math_number;
#X obj 239 25 K12/math_number;
#X obj 131 554 K12/math_number;
#X obj 239 554 K12/math_number;
#X obj 500 69 K12/preset;
#X text 354 72 Recall leftmost preset to start the example. Please
note you need to have Arduino Uno connected for the example to work.
, f 23;
#X text 226 230 The Arduino Connect object allows you to connect the
Arduino Uno board to pd-l2ork (Mega and other boards are accessible
in regular \, non-K12 pd-l2ork mode). Simply plug in the USB cable
for the Arduino and select the device number (-1 means off \, 0 is
first device \, 1 is second \, etc.). The icon will turn green when
the Arudino is connected. Connect the outlet to other Arduino digital
and analog input objects. For digital and analog output \, connect
Arduino Digital and Analog output objects to Arduino Connect's input. You
can have more than one Arduino Connect object by specifying different
device numbers. As usual \, all settings can be saved using the Preset
object.;
#X connect 7 0 10 0;
#X connect 7 0 9 0;
#X connect 9 0 16 0;
#X connect 10 0 15 0;
#X connect 11 0 7 0;
#X connect 12 0 7 0;
#X connect 13 0 12 0;
#X connect 14 0 11 0;
#N canvas 370 194 655 420 10;
#N canvas 350 118 527 287 buffer 0;
#X obj 89 37 inlet;
#X obj 74 124 f;
#X obj 141 37 inlet;
#X obj 126 124 f;
#X obj 193 37 inlet;
#X obj 178 124 f;
#X obj 245 37 inlet;
#X obj 230 124 f;
#X obj 297 37 inlet;
#X obj 282 124 f;
#X obj 349 37 inlet;
#X obj 334 124 f;
#X obj 422 37 inlet;
#X obj 230 238 list prepend a;
#X obj 230 260 outlet;
#X obj 422 60 metro 10;
#X obj 74 168 list prepend 14;
#X obj 126 146 list prepend 15;
#X obj 178 168 list prepend 16;
#X obj 230 146 list prepend 17;
#X obj 282 168 list prepend 18;
#X obj 334 146 list prepend 19;
#X connect 0 0 1 1;
#X connect 1 0 16 0;
#X connect 2 0 3 1;
#X connect 3 0 17 0;
#X connect 4 0 5 1;
#X connect 5 0 18 0;
#X connect 6 0 7 1;
#X connect 7 0 19 0;
#X connect 8 0 9 1;
#X connect 9 0 20 0;
#X connect 10 0 11 1;
#X connect 11 0 21 0;
#X connect 12 0 15 0;
#X connect 13 0 14 0;
#X connect 15 0 1 0;
#X connect 15 0 3 0;
#X connect 15 0 5 0;
#X connect 15 0 7 0;
#X connect 15 0 9 0;
#X connect 15 0 11 0;
#X connect 16 0 13 0;
#X connect 17 0 13 0;
#X connect 18 0 13 0;
#X connect 19 0 13 0;
#X connect 20 0 13 0;
#X connect 21 0 13 0;
#X restore 300 308 pd buffer, f 23;
#X msg 242 175 close \, info;
#X obj 435 246 route open;
#X obj 336 367 outlet;
#X text 51 335 message structure:;
#X text 51 347 digital = d <channel> <val>;
#X text 51 358 analog = a <channel> <val>;
#X obj 228 45 ggee/image @pd_extra/K12/objects/arduino_off.png 1;
#X obj 298 59 loadbang;
#X obj 332 37 select 0 1;
#X obj 332 15 change;
#X obj 514 102 loadbang;
#X obj 514 124 metro 1000;
#X msg 325 175 info;
#X obj 514 285 f \$0;
#X msg 514 308 arduino \$1;
#X text 513 338 used to inform its members of the instance they are linked
with;
#X obj 242 214 arduino/arduino 0;
#X obj 285 -15 preset_node k12;
#X obj 140 150 f;
#X msg 140 175 open \$1 \, info;
#X obj 207 308 list prepend d;
#X obj 242 246 route digital analog;
#X obj 237 119 t f b;
#X obj 369 175 r arduino-\$0;
#X text 195 51 Device:;
#X obj 237 53 nbx 2 14 -1 7 0 1 empty empty empty 0 -8 0 10 -262144
-1 -1 -1 256 3;
#X obj 300 276 route 0 1 2 3 4 5, f 21;
#X text 450 175 receive from downstream objects;
#X obj 99 175 inlet;
#X msg 355 59 open @pd_extra/K12/objects/arduino_on.png;
#X msg 332 80 open @pd_extra/K12/objects/arduino_off.png;
#X connect 0 0 3 0;
#X connect 1 0 17 0;
#X connect 2 0 0 6;
#X connect 2 0 10 0;
#X connect 8 0 31 0;
#X connect 9 0 31 0;
#X connect 9 1 30 0;
#X connect 10 0 9 0;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 12 0 14 0;
#X connect 13 0 17 0;
#X connect 14 0 15 0;
#X connect 15 0 3 0;
#X connect 17 0 2 0;
#X connect 17 0 22 0;
#X connect 18 0 26 0;
#X connect 19 0 20 0;
#X connect 20 0 17 0;
#X connect 20 0 22 0;
#X connect 21 0 3 0;
#X connect 22 0 21 0;
#X connect 22 1 27 0;
#X connect 23 0 19 0;
#X connect 23 1 1 0;
#X connect 24 0 17 0;
#X connect 26 0 23 0;
#X connect 27 0 0 0;
#X connect 27 1 0 1;
#X connect 27 2 0 2;
#X connect 27 3 0 3;
#X connect 27 4 0 4;
#X connect 27 5 0 5;
#X connect 29 0 17 0;
#X connect 30 0 7 0;
#X connect 31 0 7 0;
#X coords 0 -1 1 1 89 89 2 183 13;
#N canvas 259 14 508 512 10;
#X obj 375 -29 preset_hub k12 %hidden% %node% 2 5 5 %node% 2 6 7 %node%
2 6 7 %node% 2 7 5 %node% 2 7 18 %node% 2 8 4;
#X obj 139 149 cnv 15 473 182 empty empty empty 20 12 0 14 -233017
-66577 0;
#X obj 123 -7 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407
0;
#X obj 123 -35 cnv 15 501 28 empty empty Arduino/DigitalIn 5 14 0 20
-139274 -262144 0;
#X obj 594 -4 ggee/image @pd_extra/K12/icons/l2ork.png 0;
#N canvas 502 164 385 225 META 0;
#X text 8 38 INLET_0 Connect the Arduino Connect object to this inlet
;
#X text 7 58 OUTLET_0 Connect this to any object where you wish to
pass the captured sensor data (e.g. a math object or an instrument)
;
#X text 6 5 DESCRIPTION Use this object to get the digital data from
the desired Arduino Uno board pin;
#X restore 571 449 pd META;
#X obj 147 367 K12/math_number;
#X obj 147 42 K12/arduino_connect;
#X obj 147 156 K12/arduino_digital_in;
#X text 245 157 The Arcduino Digital In object takes in the digital
pin data coming from the Arduino. You can specify pin 0-13 (default
is -1=off) by clicking on the pin number and dragging it up and down
or by clicking onto the number \, typing the value \, and pressing
enter/return. Connect the Arduino Connect object to the inlet. Connect
the outlet to wherever you wish to send captured pin data (e.g. a math
object or an instrument). Outputting data will be either 0 or 1. Object's
color will change from red to Arduino bluish-green indicating valid
pin selection., f 59;
#X connect 7 0 8 0;
#X connect 8 0 6 0;
#N canvas 365 224 503 325 10;
#X obj 110 64 outlet;
#X obj 228 45 ggee/image @pd_extra/K12/objects/sarcduino_digital_off.png
1;
#X obj 228 -60 loadbang;
#X obj 58 -60 inlet;
#X obj 240 -15 preset_node k12;
#X obj 110 8 route a;
#X obj 58 -15 route arduino list;
#X obj 77 183 gate 1 0;
#X obj 58 105 t b 1 f;
#X obj 122 162 f, f 2;
#X obj 224 160 change;
#X msg 224 182 symbol arduino-\$1;
#N canvas 790 393 537 255 pin_parser 0;
#X obj 171 23 inlet;
#X obj 37 220 outlet;
#X obj 198 220 outlet;
#X obj 171 59 split 0 13;
#X obj 171 81 t f b;
#X msg 37 187 pinMode \$1 input;
#X msg 199 136 open @pd_extra/K12/objects/sarcduino_digital.png;
#X msg 228 112 open @pd_extra/K12/objects/sarcduino_digital_off.png
;
#X connect 0 0 3 0;
#X connect 3 0 4 0;
#X connect 3 1 7 0;
#X connect 4 0 5 0;
#X connect 4 1 6 0;
#X connect 5 0 1 0;
#X connect 6 0 2 0;
#X connect 7 0 2 0;
#X restore 277 104 pd pin_parser;
#X obj 110 41 route -1;
#X msg 77 205 pinMode $f1 analog;
#X obj 77 235 send, f 25;
#X text 211 45 INPUT;
#X msg 228 -37 open @pd_extra/K12/objects/sarcduino_digital_off.png
;
#X text 206 61 pin:;
#X obj 230 64 nbx 3 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 -1 256 3;
#X connect 2 0 17 0;
#X connect 3 0 6 0;
#X connect 4 0 19 0;
#X connect 5 0 13 0;
#X connect 6 0 8 0;
#X connect 6 1 5 0;
#X connect 7 0 14 0;
#X connect 8 0 9 0;
#X connect 8 1 7 0;
#X connect 8 2 10 0;
#X connect 9 0 7 1;
#X connect 10 0 11 0;
#X connect 11 0 15 1;
#X connect 12 0 9 0;
#X connect 12 0 13 1;
#X connect 12 1 1 0;
#X connect 13 0 0 0;
#X connect 14 0 15 0;
#X connect 17 0 1 0;
#X connect 19 0 12 0;
#X coords 0 -1 1 1 89 89 2 183 13;
#N canvas 330 91 508 474 10;
#X obj 375 -29 preset_hub k12 %hidden% %node% 2 5 5 %node% 2 6 7 %node%
2 6 7 %node% 2 7 5 %node% 2 7 18 %node% 2 8 4 %node% 2 8 4;
#X obj 139 119 cnv 15 472 163 empty empty empty 20 12 0 14 -233017
-66577 0;
#X obj 123 -7 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407
0;
#X obj 123 -35 cnv 15 501 28 empty empty Arduino/DigitalOut 5 14 0
20 -139274 -262144 0;
#X obj 594 -4 ggee/image @pd_extra/K12/icons/l2ork.png 0;
#N canvas 502 164 385 225 META 0;
#X text 6 5 DESCRIPTION Use this object to send digital data (0 or
1) to the specified Arduino Uno pin;
#X text 8 38 INLET_0 Connect the data stream you wish to send to Arduino
;
#X text 7 58 OUTLET_0 Connect to Arduino Connect object's inlet;
#X restore 571 409 pd META;
#X obj 147 40 K12/math_number;
#X obj 147 308 K12/arduino_connect;
#X obj 147 127 K12/arduino_digital_out;
#X text 245 127 The Arcduino Digital Out object takes in the incoming
data and sends it to a desired Arduino digital pin. You can specify
pin 0-13 (default -1=off) by clicking on the pin number and dragging
it up and down or by clicking onto the number \, typing the value \,
and pressing enter/return. Connect the data stream you wish to send
to the pin into object's inlet (either 0 or 1). Connect the outlet
to the Arduino Connect's inlet. Object's color will change from red
to Arduino bluish-green indicating valid pin selection., f 59;
#X connect 6 0 8 0;
#X connect 8 0 7 0;
#N canvas 316 152 503 325 10;
#X obj 58 237 outlet;
#X obj 228 45 ggee/image @pd_extra/K12/objects/sarcduino_digital_off.png
1;
#X obj 228 -60 loadbang;
#X obj 58 -60 inlet;
#X obj 240 -15 preset_node k12;
#N canvas 732 363 518 255 pin_parser 0;
#X obj 171 23 inlet;
#X obj 37 220 outlet;
#X obj 228 220 outlet;
#X obj 171 59 split 0 13;
#X obj 171 81 t f b;
#X msg 198 139 open @pd_extra/K12/objects/sarcduino_digital.png;
#X msg 228 109 open @pd_extra/K12/objects/sarcduino_digital_off.png
;
#X connect 0 0 3 0;
#X connect 3 0 4 0;
#X connect 3 1 6 0;
#X connect 4 0 1 0;
#X connect 4 1 5 0;
#X connect 5 0 2 0;
#X connect 6 0 2 0;
#X restore 277 104 pd pin_parser;
#X obj 277 126 t f f;
#X obj 58 162 pack 0 0;
#X msg 304 150 pinMode \$1 output;
#X msg 58 185 digital \$2 \$1;
#X text 208 45 OUTPUT;
#X msg 228 -37 open @pd_extra/K12/objects/arduino_digital_off.png;
#X text 206 61 pin:;
#X obj 230 64 nbx 3 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 -1 256 3;
#X connect 2 0 11 0;
#X connect 3 0 7 0;
#X connect 4 0 13 0;
#X connect 5 0 6 0;
#X connect 5 1 1 0;
#X connect 6 0 7 1;
#X connect 6 1 8 0;
#X connect 7 0 9 0;
#X connect 8 0 0 0;
#X connect 9 0 0 0;
#X connect 11 0 1 0;
#X connect 13 0 5 0;
#X coords 0 -1 1 1 89 89 2 183 13;
#N canvas 315 92 502 525 10;
#X obj 348 -28 preset_hub k12 %hidden% %node% 2 5 5 %node% 2 6 7 %node%
2 6 7 %node% 2 7 10 %node% 2 7 11 %node% 2 7 9 %node% 2 7 10 %node%
2 8 18 %node% 2 10 4;
#X obj 132 224 cnv 15 480 104 empty empty empty 20 12 0 14 -233017
-66577 0;
#X obj 123 -7 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407
0;
#X obj 123 -35 cnv 15 501 28 empty empty Logic/Hit 5 14 0 20 -139274
-262144 0;
#X obj 594 -4 ggee/image @pd_extra/K12/icons/l2ork.png 0;
#N canvas 587 449 373 126 META 0;
#X text 6 5 DESCRIPTION This is used to detect sudden changes in a
data stream;
#X text 6 38 INLET_0 Connect any non audio data stream to this inlet
;
#X text 6 58 OUTLET_0 This outputs a 1 if a hit is detected and a 0
once the detected hit has ended;
#X restore 570 458 pd META;
#X obj 140 364 K12/math_number;
#X obj 140 231 K12/logic_hit;
#X obj 140 15 K12/arduino_connect;
#X text 239 246 The Logic Hit object detects sudden changes in the
incoming data. Connect any non-audio data stream to the inlet. This
object will output the number 1 when a hit is detected and a 0 when
the detected hit has ended.;
#X obj 140 122 K12/arduino_analog_in;
#X connect 7 0 6 0;
#X connect 8 0 10 0;
#X connect 10 0 7 0;
#N canvas 405 30 539 317 10;
#X obj 33 -88 inlet;
#X obj 261 121 ggee/image @pd_extra/K12/objects/logic_hit1.png 1;
#X obj 169 -9 select 0 1;
#X obj 197 17 delay 100;
#X obj 261 17 loadbang;
#X obj 33 206 outlet;
#N canvas 47 165 465 442 delays 0;
#X obj 51 406 outlet;
#X obj 51 16 inlet;
#X obj 339 16 inlet;
#X obj 339 74 delay 15;
#X obj 339 121 delay 15;
#X obj 339 174 delay 15;
#X obj 339 228 delay 15;
#X obj 339 279 delay 15;
#X obj 339 334 delay 15;
#X msg 60 38 stop;
#X msg 51 118 open @pd_extra/K12/objects/logic_hit6.png;
#X msg 51 167 open @pd_extra/K12/objects/logic_hit5.png;
#X msg 51 216 open @pd_extra/K12/objects/logic_hit4.png;
#X msg 51 270 open @pd_extra/K12/objects/logic_hit3.png;
#X msg 51 322 open @pd_extra/K12/objects/logic_hit2.png;
#X msg 51 368 open @pd_extra/K12/objects/logic_hit1.png;
#X connect 1 0 10 0;
#X connect 1 0 9 0;
#X connect 2 0 3 0;
#X connect 3 0 10 0;
#X connect 3 0 4 0;
#X connect 4 0 11 0;
#X connect 4 0 5 0;
#X connect 5 0 12 0;
#X connect 5 0 6 0;
#X connect 6 0 13 0;
#X connect 6 0 7 0;
#X connect 7 0 14 0;
#X connect 7 0 8 0;
#X connect 8 0 15 0;
#X connect 9 0 3 0;
#X connect 9 0 4 0;
#X connect 9 0 5 0;
#X connect 9 0 6 0;
#X connect 9 0 7 0;
#X connect 9 0 8 0;
#X connect 10 0 0 0;
#X connect 11 0 0 0;
#X connect 12 0 0 0;
#X connect 13 0 0 0;
#X connect 14 0 0 0;
#X connect 15 0 0 0;
#X restore 146 41 pd delays;
#X obj 217 120 nbx 4 14 0 1e+37 0 1 \$0-s-null \$0-r-null empty 0 -8
0 10 -262144 -1 -1 0.25 256 3;
#X obj 217 142 nbx 4 14 0 1e+37 0 1 \$0-s-null \$0-r-null empty 0 -8
0 10 -262144 -1 -1 0.1 256 3;
#X obj 311 89 preset_node k12;
#X obj 311 111 preset_node k12;
#X obj 33 -62 t f f;
#X obj 33 -28 -;
#X obj 84 47 sel 1;
#X msg 84 69 1;
#X obj 33 47 sel 1;
#X msg 33 69 0;
#X obj 33 123 change;
#X text 224 109 up;
#X text 224 131 down;
#X obj 217 183 * -1;
#X msg 261 40 open @pd_extra/K12/objects/logic_hit1.png;
#X obj 84 11 > 0.5;
#X obj 33 11 < -0.1;
#X connect 0 0 11 0;
#X connect 2 1 3 0;
#X connect 2 1 6 0;
#X connect 3 0 6 1;
#X connect 4 0 21 0;
#X connect 6 0 1 0;
#X connect 7 0 9 0;
#X connect 7 0 22 1;
#X connect 8 0 10 0;
#X connect 8 0 20 0;
#X connect 9 0 7 0;
#X connect 10 0 8 0;
#X connect 11 0 12 1;
#X connect 11 1 12 0;
#X connect 12 0 22 0;
#X connect 12 0 23 0;
#X connect 13 0 14 0;
#X connect 14 0 17 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 17 0 5 0;
#X connect 17 0 2 0;
#X connect 20 0 23 1;
#X connect 21 0 1 0;
#X connect 22 0 13 0;
#X connect 23 0 15 0;
#X coords 0 -1 1 1 89 89 2 216 89;
#N canvas 373 60 501 501 10; #N canvas 363 50 501 501 10;
#X obj 354 -31 preset_hub k12 %hidden% %node% 2 7 7 %node% 2 8 7 %node% #X obj 354 -31 preset_hub k12 %hidden% %node% 2 7 7 %node% 2 8 7 %node%
2 9 7 %node% 2 6 5 %node% 2 7 7; 2 9 7 %node% 2 6 5 %node% 2 7 7;
#X obj 133 241 cnv 15 479 188 empty empty empty 20 12 0 14 -233017 #X obj 133 241 cnv 15 479 188 empty empty empty 20 12 0 14 -233017
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
#X obj 123 -35 cnv 15 501 28 empty empty Math/Number 5 14 0 20 -139274 #X obj 123 -35 cnv 15 501 28 empty empty Math/Number 5 14 0 20 -139274
-262144 0; -262144 0;
#X obj 594 -4 ggee/image @pd_extra/K12/icons/l2ork.png 0; #X obj 594 -4 ggee/image @pd_extra/K12/icons/l2ork.png 0;
#N canvas 71 83 450 514 META 0; #N canvas 61 73 450 514 META 0;
#X text 7 40 INLET_0 Connect any non-signal object here to monitor #X text 7 40 INLET_0 Connect any non-signal object here to monitor
its value; its value;
#X text 6 99 OUTLET_0 Connect this to any math or instrument objects
;
#X text 6 115 OUTLET_1 Connect this to any signal object; #X text 6 115 OUTLET_1 Connect this to any signal object;
#X text 5 69 INLET_1 Connect any non-signal object here to push value #X text 5 69 INLET_1 Connect any non-signal object here to push value
set inside the object whenever a non-zero value is sent; set inside the object whenever a non-zero value is sent;
#X text 6 5 DESCRIPTION This shows you the numbers that are passing #X text 6 5 DESCRIPTION This shows you the numbers that are passing
through this object; through this object;
#X text 6 99 OUTLET_0 Connect this to any math or instrument object
;
#X restore 566 439 pd META; #X restore 566 439 pd META;
#X obj 138 135 K12/sarcduino_analog; #X obj 138 135 K12/sarcduino_analog;
#X obj 138 244 K12/math_number; #X obj 138 244 K12/math_number;
...@@ -30,8 +30,8 @@ number. In that case \, the output will be whatever you set the number ...@@ -30,8 +30,8 @@ number. In that case \, the output will be whatever you set the number
to.; to.;
#X text 238 345 You can also use its right inlet to transform any NON-ZERO #X text 238 345 You can also use its right inlet to transform any NON-ZERO
value into the value currently stored inside the number object.; value into the value currently stored inside the number object.;
#X text 238 390 The number can also output continuous values via blue
outlet that can be used in signal/sound calculations.;
#X obj 138 26 K12/sarcduino_connect; #X obj 138 26 K12/sarcduino_connect;
#X text 238 390 The number can also output continuous values via blue
outlet that can be used in manipulating audio.;
#X connect 6 0 7 0; #X connect 6 0 7 0;
#X connect 11 0 6 0; #X connect 10 0 6 0;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment