Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Wilkes
purr-data
Commits
dfee0225
Commit
dfee0225
authored
9 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Patches
Plain Diff
ported: "*added servo option"
from pd-l2ork: f37aeb038f4bd20b2ac74c9c2d81f75f72162216
parent
073cdcab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
l2ork_addons/K12/arduino_analog_out-help.pd
+17
-15
17 additions, 15 deletions
l2ork_addons/K12/arduino_analog_out-help.pd
l2ork_addons/K12/arduino_analog_out.pd
+53
-25
53 additions, 25 deletions
l2ork_addons/K12/arduino_analog_out.pd
with
70 additions
and
40 deletions
l2ork_addons/K12/arduino_analog_out-help.pd
+
17
−
15
View file @
dfee0225
#N canvas 2
8
6
5
8 508 537 10;
#N canvas 2
7
6
4
8 508 537 10;
#X obj 375 -29 preset_hub k12 %hidden% %node% 2 5 5 %node% 2 6 7 %node%
#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
2 6 7 %node% 2 7 5 %node% 2 7 18 %node% 2 8 4 %node% 2 8 4 %node% 2
8 4;
8 4
%node% 2 7 17
;
#X obj 139 119 cnv 15 47
3
2
10
empty empty empty 20 12 0 14 -233017
#X obj 139 119 cnv 15 47
1
2
63
empty empty empty 20 12 0 14 -233017
-66577 0;
-66577 0;
#X obj 123 -7 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407
#X obj 123 -7 cnv 3 501 3 empty empty empty 5 14 0 20 -260097 -191407
0;
0;
#X obj 123 -35 cnv 15 501 28 empty empty Arduino/DigitalOut 5 14 0
#X obj 123 -35 cnv 15 501 28 empty empty Arduino/DigitalOut 5 14 0
20 -139274 -262144 0;
20 -139274 -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 4
8
2 1
4
4 385 225 META 0;
#N canvas 4
7
2 1
3
4 385 225 META 0;
#X text 8 38 INLET_0 Connect the data stream you wish to send to Arduino
#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 7 58 OUTLET_0 Connect to Arduino Connect object's inlet;
#X text 6 5 DESCRIPTION Use this object to send analog data (between
#X text 6 5 DESCRIPTION Use this object to send analog data (between
0 and 1) to the specified Arduino Uno pin;
0 and 1) to the specified Arduino Uno pin;
#X restore 571 4
73
pd META;
#X restore 571 4
85
pd META;
#X obj 147 40 K12/math_number;
#X obj 147 40 K12/math_number;
#X obj 147
35
8 K12/arduino_connect;
#X obj 147
40
8 K12/arduino_connect;
#X obj 147 127 K12/arduino_analog_out;
#X obj 147 127 K12/arduino_analog_out;
#X text 245 128 The Arcduino Analog Out object takes in the incoming
#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
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).
digital pin that is PWM enabled (pins 3 \, 5 \, 6 \, 9 \, 10 \, and
You can specify pin 3 \, 5 \, 6 \, 9 \, 10 \, and 11 (default -1=off)
11 \, marked with ~) or if you want to control a servo motor \, you
by clicking on the pin number and dragging it up and down or by clicking
can use any pin between 2 and 13 \, in which case you need to enable
onto the number \, typing the value \, and pressing enter/return. Connect
the servo option. Selecting pin -1 will turn off the output.For PWM
the data stream with values between 0 and 1 that you wish to send to
output you can specify by clicking on the pin number and dragging it
the pin into object's inlet. Connect the outlet to the Arduino Connect's
up and down or by clicking onto the number \, typing the value \, and
inlet.Object's color will change from red to Aruino bluish-green
pressing enter/return. Connect the data stream with values between
indicating valid pin selection (e.g. not all pins allow for PWM analog
0 and 1 that you wish to send to the pin into object's inlet. Connect
output)., f 59;
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 6 0 8 0;
#X connect 8 0 7 0;
#X connect 8 0 7 0;
This diff is collapsed.
Click to expand it.
l2ork_addons/K12/arduino_analog_out.pd
+
53
−
25
View file @
dfee0225
#N canvas
422 148
500 3
25
10;
#N canvas
595 62
500 3
99
10;
#X obj 58
2
38 outlet;
#X obj 58 3
0
8 outlet;
#X obj 228 45 ggee/image @pd_extra/K12/objects/arduino_analog
_off
.png
#X obj 228 45 ggee/image @pd_extra/K12/objects/arduino_analog.png
1
1
;
;
#X obj 228 -60 loadbang;
#X obj 228 -60 loadbang;
#X obj 58 -60 inlet;
#X obj 58 -60 inlet;
#X obj 240 -15 preset_node k12;
#X obj 240 -15 preset_node k12;
#X text 20
6 62
pin:;
#X text 20
4 56
pin:;
#N canvas
372 1
22 6
21
425 pin_parser 0;
#N canvas
413
22
1
6
73
425 pin_parser 0;
#X obj
93 3
5 inlet;
#X obj
138 1
5 inlet;
#X obj 93 123 select 3 5 6 9 10 11, f 44;
#X obj 93 123 select 3 5 6 9 10 11, f 44;
#X obj 114 280 outlet;
#X obj 114 280 outlet;
#X obj 273 369 outlet;
#X obj 273 369 outlet;
...
@@ -19,10 +19,14 @@
...
@@ -19,10 +19,14 @@
#X msg 310 145 11;
#X msg 310 145 11;
#X obj 273 276 t b;
#X obj 273 276 t b;
#X obj 354 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 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 0 4 0;
#X connect 1 1 5 0;
#X connect 1 1 5 0;
#X connect 1 2 6 0;
#X connect 1 2 6 0;
...
@@ -46,26 +50,50 @@
...
@@ -46,26 +50,50 @@
#X connect 11 0 12 0;
#X connect 11 0 12 0;
#X connect 12 0 3 0;
#X connect 12 0 3 0;
#X connect 13 0 3 0;
#X connect 13 0 3 0;
#X restore 277 104 pd pin_parser;
#X connect 14 0 17 0;
#X msg 304 153 pinMode \$1 pwm;
#X connect 15 0 1 0;
#X obj 277 126 t f f;
#X connect 15 1 18 0;
#X msg 58 184 pwm \$2 \$1;
#X connect 16 0 15 1;
#X obj 58 161 pack 0 0;
#X connect 17 0 16 0;
#X text 208 46 OUTPUT;
#X connect 17 1 15 0;
#X obj 230 65 nbx 3 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
#X connect 18 0 2 0;
-262144 -1 -1 -1 256 3;
#X connect 18 0 10 0;
#X msg 228 -37 open @pd_extra/K12/objects/arduino_analog_off.png
#X connect 18 1 11 0;
;
#X restore 284 160 pd pin_parser;
#X connect 2 0 13 0;
#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 3 0 10 0;
#X connect 4 0 1
2
0;
#X connect 4 0 1
1
0;
#X connect 6 0 8 0;
#X connect 6 0 8 0;
#X connect 6 1 1 0;
#X connect 6 1 1 0;
#X connect 7 0 0 0;
#X connect 7 0 0 0;
#X connect 8 0 10 1;
#X connect 8 0 10 1;
#X connect 8 1 7
0
;
#X connect 8 1
1
7
1
;
#X connect 9 0 0 0;
#X connect 9 0 0 0;
#X connect 10 0 9 0;
#X connect 10 0 9 0;
#X connect 12 0 6 0;
#X connect 11 0 6 1;
#X connect 13 0 1 0;
#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;
#X coords 0 -1 1 1 89 89 2 183 13;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment