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

ported: "*added servo option"

from pd-l2ork: f37aeb038f4bd20b2ac74c9c2d81f75f72162216
parent 073cdcab
No related branches found
No related tags found
No related merge requests found
#N canvas 286 58 508 537 10;
#N canvas 276 48 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
8 4 %node% 2 7 17;
#X obj 139 119 cnv 15 471 263 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;
#N canvas 472 134 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 restore 571 485 pd META;
#X obj 147 40 K12/math_number;
#X obj 147 358 K12/arduino_connect;
#X obj 147 408 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;
digital pin that is PWM enabled (pins 3 \, 5 \, 6 \, 9 \, 10 \, and
11 \, marked with ~) or if you want to control a servo motor \, you
can use any pin between 2 and 13 \, in which case you need to enable
the servo option. Selecting pin -1 will turn off the output. For PWM
output you can specify 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/arduino_analog_off.png
1;
#N canvas 595 62 500 399 10;
#X obj 58 308 outlet;
#X obj 228 45 ggee/image @pd_extra/K12/objects/arduino_analog.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 text 204 56 pin:;
#N canvas 413 221 673 425 pin_parser 0;
#X obj 138 15 inlet;
#X obj 93 123 select 3 5 6 9 10 11, f 44;
#X obj 114 280 outlet;
#X obj 273 369 outlet;
......@@ -19,10 +19,14 @@
#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/arduino_analog_off.png
;
#X msg 354 298 open @pd_extra/K12/objects/arduino_analog_off.png;
#X msg 273 338 open @pd_extra/K12/objects/arduino_analog.png;
#X connect 0 0 1 0;
#X obj 93 15 inlet;
#X obj 93 92 gate 2 1;
#X obj 138 67 f;
#X obj 93 37 t b f;
#X obj 387 123 split 2 13;
#X connect 0 0 16 0;
#X connect 1 0 4 0;
#X connect 1 1 5 0;
#X connect 1 2 6 0;
......@@ -46,26 +50,50 @@
#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/arduino_analog_off.png
;
#X connect 2 0 13 0;
#X connect 14 0 17 0;
#X connect 15 0 1 0;
#X connect 15 1 18 0;
#X connect 16 0 15 1;
#X connect 17 0 16 0;
#X connect 17 1 15 0;
#X connect 18 0 2 0;
#X connect 18 0 10 0;
#X connect 18 1 11 0;
#X restore 284 160 pd pin_parser;
#X msg 267 237 pinMode \$1 pwm;
#X obj 284 182 t f f;
#X msg 58 244 pwm \$2 \$1;
#X obj 58 221 pack 0 0;
#X obj 228 59 nbx 3 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 2 256 3;
#X msg 228 -37 open @pd_extra/K12/objects/arduino_analog_off.png;
#X obj 238 74 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X text 200 71 servo:;
#X text 196 42 PWM OUTPUT;
#X obj 280 13 preset_node k12;
#X obj 266 214 gate 2 1;
#X msg 311 258 pinMode \$1 servo;
#X obj 239 130 t f f;
#X obj 239 108 + 1;
#X connect 2 0 12 0;
#X connect 3 0 10 0;
#X connect 4 0 12 0;
#X connect 4 0 11 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 8 1 17 1;
#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 connect 11 0 6 1;
#X connect 12 0 1 0;
#X connect 13 0 20 0;
#X connect 16 0 13 0;
#X connect 17 0 7 0;
#X connect 17 1 18 0;
#X connect 18 0 0 0;
#X connect 19 0 6 0;
#X connect 19 1 17 0;
#X connect 20 0 19 0;
#X coords 0 -1 1 1 89 89 2 183 13;
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