-
Notifications
You must be signed in to change notification settings - Fork 3
/
arduino-help.pat
849 lines (848 loc) · 25.3 KB
/
arduino-help.pat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
max v2;
#N vpatcher 221 44 1110 754;
#P origin -34 3;
#P window setfont "Sans Serif" 10.;
#P window linecount 5;
#P comment 24 262 86 196618 alternatively you can send a message "port" + portnumber (0 \, 1 \, 2);
#P hidden button 35 284 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 35 262 84 196617 prepend set port;
#P window setfont "Sans Serif" 10.;
#N vpatcher 10 59 391 317;
#P window setfont "Sans Serif" 9.;
#P newex 174 166 73 196617 print asdfasdf;
#P window setfont "Sans Serif" 10.;
#P newex 90 89 56 196618 route port;
#P newex 184 114 40 196618 t clear;
#P newex 90 137 111 196618 prepend append;
#P newex 64 65 36 196618 serial;
#P newex 90 114 25 196618 iter;
#P inlet 64 45 15 0;
#P outlet 90 162 15 0;
#P connect 1 0 3 0;
#P connect 3 1 6 0;
#P connect 6 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 0 0;
#P connect 5 0 0 0;
#P connect 3 1 7 0;
#P connect 6 0 5 0;
#P pop;
#P hidden newobj 166 217 52 196618 p devices;
#P hidden newex 76 219 48 196618 loadbang;
#P message 127 266 41 196618 port 0;
#P message 126 219 32 196618 print;
#P user ubumenu 126 241 135 196618 0 1 1 0;
#X add;
#X prefix_set 0 0 <none> 0;
#X pattrmode 1;
#P comment 24 241 100 196618 select serial port;
#P user panel 123 262 184 26;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P window linecount 4;
#P comment 86 611 156 196617 2006 \, released under GNU GPL Gerda Strobl \, Georg Holzmann Ported to Max by Marius Schebella;
#P window linecount 1;
#N vpatcher 115 329 791 793;
#P window setfont "Sans Serif" 9.;
#P flonum 369 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 218 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 64 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P message 383 297 60 196618 pwm 11 0;
#P window setfont "Sans Serif" 9.;
#P newex 369 326 69 196617 s $0-arduino;
#P window setfont "Sans Serif" 10.;
#P newex 369 190 41 196618 * 0.01;
#P user hslider 369 165 18 128 101 1 0 0;
#P message 369 240 67 196618 pwm 11 \$1;
#P window setfont "Sans Serif" 9.;
#P comment 369 147 44 196617 Pin 11:;
#P comment 383 279 100 196617 disable PWM:;
#P window setfont "Sans Serif" 10.;
#P message 232 297 60 196618 pwm 10 0;
#P window setfont "Sans Serif" 9.;
#P newex 218 326 69 196617 s $0-arduino;
#P window setfont "Sans Serif" 10.;
#P newex 218 190 41 196618 * 0.01;
#P user hslider 218 165 18 128 101 1 0 0;
#P message 218 240 67 196618 pwm 10 \$1;
#P window setfont "Sans Serif" 9.;
#P comment 218 147 44 196617 Pin 10:;
#P comment 232 279 100 196617 disable PWM:;
#P window setfont "Sans Serif" 10.;
#P message 78 297 53 196618 pwm 9 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 64 326 69 196617 s $0-arduino;
#P window linecount 2;
#P comment 64 82 247 196617 With the help of PWM you can write analog values to the pins 9 \, 10 \, 11 of your Arduino board.;
#P window linecount 1;
#P comment 64 120 312 196617 NOTE: Don't forget to set the pins to ouput mode first!;
#P window setfont "Sans Serif" 10.;
#P newex 64 190 41 196618 * 0.01;
#P user hslider 64 165 18 128 101 1 0 0;
#P message 64 240 63 196618 pwm 9 \$1;
#P window setfont "Sans Serif" 9.;
#P comment 64 147 44 196617 Pin 9:;
#P window setfont "Sans Serif" 10.;
#P window linecount 0;
#P comment 64 60 265 196618 Analog Output \, PWM (Pulse Width Modulation);
#P window setfont "Sans Serif" 9.;
#P comment 78 279 100 196617 disable PWM:;
#P connect 4 0 5 0;
#P connect 5 0 24 0;
#P connect 24 0 3 0;
#P connect 3 0 8 0;
#P connect 9 0 8 0;
#P connect 13 0 14 0;
#P connect 14 0 25 0;
#P connect 25 0 12 0;
#P connect 16 0 15 0;
#P connect 12 0 15 0;
#P connect 20 0 21 0;
#P connect 21 0 26 0;
#P connect 26 0 19 0;
#P connect 19 0 22 0;
#P connect 23 0 22 0;
#P pop;
#P newobj 86 511 152 196617 patcher ANALOG-OUTPUT-PWM;
#P comment 795 414 24 196617 13;
#P comment 775 414 24 196617 12;
#P comment 757 414 39 196617 11;
#P comment 736 414 23 196617 10;
#P comment 718 414 14 196617 9;
#P comment 699 414 14 196617 8;
#P comment 678 414 14 196617 7;
#P comment 659 414 14 196617 6;
#P comment 639 414 14 196617 5;
#P comment 619 414 14 196617 4;
#P comment 599 414 14 196617 3;
#P comment 579 414 14 196617 2;
#P comment 558 414 14 196617 1;
#P comment 558 431 18 196617 Tx;
#B frgb 0 166 41;
#P user panel 559 431 16 16;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 537 431 18 196617 Rx;
#B frgb 198 0 5;
#P user panel 537 431 16 16;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 537 414 14 196617 0;
#P toggle 578 431 15 0;
#P toggle 598 431 15 0;
#P toggle 618 431 15 0;
#P toggle 638 431 15 0;
#P toggle 658 431 15 0;
#P toggle 678 431 15 0;
#P toggle 698 431 15 0;
#P toggle 718 431 15 0;
#P toggle 738 431 15 0;
#P toggle 758 431 15 0;
#P toggle 778 431 15 0;
#P toggle 798 431 15 0;
#P message 538 481 79 196617 pinMode 13 0;
#N vpatcher 163 104 888 459;
#P inlet 49 57 15 0;
#P inlet 89 57 15 0;
#P inlet 128 57 15 0;
#P inlet 168 57 15 0;
#P inlet 208 57 15 0;
#P inlet 248 57 15 0;
#P inlet 287 57 15 0;
#P inlet 327 57 15 0;
#P inlet 368 56 15 0;
#P inlet 408 56 15 0;
#P inlet 447 56 15 0;
#P inlet 487 56 15 0;
#P inlet 527 56 15 0;
#P window setfont "Sans Serif" 10.;
#P message 49 99 77 196618 pinMode 0 \$1;
#P message 89 121 77 196618 pinMode 1 \$1;
#P message 128 143 77 196618 pinMode 2 \$1;
#P message 168 163 77 196618 pinMode 3 \$1;
#P message 208 95 77 196618 pinMode 4 \$1;
#P message 248 117 77 196618 pinMode 5 \$1;
#P message 287 139 77 196618 pinMode 6 \$1;
#P message 327 159 77 196618 pinMode 7 \$1;
#P message 368 91 77 196618 pinMode 8 \$1;
#P message 408 113 77 196618 pinMode 9 \$1;
#P message 447 135 84 196618 pinMode 10 \$1;
#P message 487 155 84 196618 pinMode 11 \$1;
#P message 527 83 84 196618 pinMode 12 \$1;
#P inlet 566 56 15 0;
#P message 566 103 84 196618 pinMode 13 \$1;
#P outlet 305 282 15 0;
#P newex 305 243 30 196618 t b l;
#P newex 305 212 66 196618 prepend set;
#P connect 30 0 17 0;
#P connect 29 0 16 0;
#P connect 28 0 15 0;
#P connect 27 0 14 0;
#P connect 26 0 13 0;
#P connect 25 0 12 0;
#P connect 24 0 11 0;
#P connect 3 0 0 0;
#P connect 5 0 0 0;
#P connect 6 0 0 0;
#P connect 7 0 0 0;
#P connect 8 0 0 0;
#P connect 9 0 0 0;
#P connect 10 0 0 0;
#P connect 11 0 0 0;
#P connect 12 0 0 0;
#P connect 13 0 0 0;
#P connect 14 0 0 0;
#P connect 15 0 0 0;
#P connect 16 0 0 0;
#P connect 17 0 0 0;
#P connect 0 0 1 0;
#P connect 1 1 2 0;
#P connect 1 0 2 0;
#P connect 23 0 10 0;
#P connect 22 0 9 0;
#P connect 21 0 8 0;
#P connect 20 0 7 0;
#P connect 19 0 6 0;
#P connect 18 0 5 0;
#P connect 4 0 3 0;
#P pop;
#P newobj 538 453 271 196617 p send-to-arduino;
#P user panel 535 476 101 28;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P message 578 302 111 196617 firmata_version_1.0;
#P hidden newex 127 312 78 196617 s $0-arduino;
#P comment 91 162 388 196617 4. If you still have troubles \, mail to hmm... max/msp mailinglist???;
#P comment 91 143 388 196617 3. Upload the firmware onto your arduino with the Arduino programming software;
#P comment 298 123 148 196617 at.or.at/hans/pd/objects.html;
#B frgb 36 35 130;
#P user panel 297 121 148 17;
#X brgb 214 214 214;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user ubutton 297 119 147 20 0 0;
#P window linecount 2;
#P hidden message 405 119 250 196617 \; max launchbrowser http://at.or.at/hans/pd/objects;
#P window linecount 1;
#P comment 91 123 206 196617 2. You need the firmware of Pduino for Max:;
#P comment 91 104 166 196617 1. General information on Arduino:;
#P comment 254 104 91 196617 www.arduino.cc;
#B frgb 36 35 130;
#P user panel 253 102 84 17;
#X brgb 214 214 214;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user ubutton 253 102 84 17 0 0;
#P window linecount 2;
#P hidden message 350 102 208 196617 \; max launchbrowser http://www.arduino.cc;
#P hidden message 394 162 261 196617 \; max launchbrowser mailto:marius.schebella@gmail.com;
#P window linecount 1;
#N vpatcher 248 49 957 381;
#P toggle 147 102 15 0;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P comment 496 102 24 196618 13;
#P user led 500 122 17 17 1 150;
#P comment 475 102 24 196618 12;
#P comment 456 102 39 196618 11;
#P comment 434 102 23 196618 10;
#P comment 414 102 14 196618 9;
#P comment 393 102 14 196618 8;
#P comment 372 102 14 196618 7;
#P comment 351 102 14 196618 6;
#P comment 331 102 14 196618 5;
#P comment 308 102 14 196618 4;
#P comment 288 102 14 196618 3;
#P comment 266 102 14 196618 2;
#P comment 245 102 14 196618 1;
#P comment 247 122 18 196618 Tx;
#B frgb 0 166 41;
#P user panel 248 122 16 16;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user led 311 122 17 17 1 150;
#P user led 290 122 17 17 1 150;
#P user led 269 122 17 17 1 150;
#P user led 479 122 17 17 1 150;
#P user led 458 122 17 17 1 150;
#P user led 437 122 17 17 1 150;
#P user led 416 122 17 17 1 150;
#P user led 395 122 17 17 1 150;
#P user led 374 122 17 17 1 150;
#P user led 353 122 17 17 1 150;
#P user led 332 122 17 17 1 150;
#N vpatcher 769 103 1478 563;
#P inlet 42 53 15 0;
#P inlet 82 53 15 0;
#P inlet 121 53 15 0;
#P inlet 161 53 15 0;
#P inlet 201 53 15 0;
#P inlet 241 53 15 0;
#P inlet 280 53 15 0;
#P inlet 320 53 15 0;
#P inlet 361 52 15 0;
#P inlet 401 52 15 0;
#P inlet 440 52 15 0;
#P inlet 480 52 15 0;
#P inlet 520 52 15 0;
#P window setfont "Sans Serif" 10.;
#P message 42 95 68 196618 digital 0 \$1;
#P message 82 117 68 196618 digital 1 \$1;
#P message 121 139 68 196618 digital 2 \$1;
#P message 161 159 68 196618 digital 3 \$1;
#P message 201 91 68 196618 digital 4 \$1;
#P message 241 113 68 196618 digital 5 \$1;
#P message 280 135 68 196618 digital 6 \$1;
#P message 320 155 68 196618 digital 7 \$1;
#P message 361 87 68 196618 digital 8 \$1;
#P message 401 109 68 196618 digital 9 \$1;
#P message 440 131 75 196618 digital 10 \$1;
#P message 480 151 75 196618 digital 11 \$1;
#P message 520 79 75 196618 digital 12 \$1;
#P inlet 559 52 15 0;
#P message 559 99 75 196618 digital 13 \$1;
#P outlet 298 313 15 0;
#P newex 298 274 30 196618 t b l;
#P newex 298 225 66 196618 prepend set;
#P connect 30 0 17 0;
#P connect 29 0 16 0;
#P connect 28 0 15 0;
#P connect 27 0 14 0;
#P connect 26 0 13 0;
#P connect 25 0 12 0;
#P connect 24 0 11 0;
#P connect 17 0 0 0;
#P connect 16 0 0 0;
#P connect 15 0 0 0;
#P connect 14 0 0 0;
#P connect 13 0 0 0;
#P connect 12 0 0 0;
#P connect 11 0 0 0;
#P connect 10 0 0 0;
#P connect 9 0 0 0;
#P connect 8 0 0 0;
#P connect 7 0 0 0;
#P connect 6 0 0 0;
#P connect 5 0 0 0;
#P connect 3 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 1 1 2 0;
#P connect 23 0 10 0;
#P connect 22 0 9 0;
#P connect 21 0 8 0;
#P connect 20 0 7 0;
#P connect 19 0 6 0;
#P connect 18 0 5 0;
#P connect 4 0 3 0;
#P pop;
#P newobj 227 145 286 196618 p generate;
#P newex 147 79 63 196618 metro 100;
#P comment 224 122 18 196618 Rx;
#B frgb 198 0 5;
#P user panel 225 122 16 16;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 224 102 14 196618 0;
#P user led 147 122 17 17 1 150;
#P comment 168 122 39 196618 ALL;
#P toggle 147 60 15 0;
#P window linecount 0;
#P comment 529 124 136 196618 I/O the individual pins:;
#P comment 20 33 253 196618 NOTE: don't forget to set pins to output mode first!;
#P message 227 184 95 196618 digital 2 0;
#P newex 227 216 105 196618 send $0-arduino;
#P comment 339 189 162 196618 <-- this is the message format;
#P comment 21 59 115 196618 strobe all pins -->;
#P connect 6 0 12 0;
#P connect 12 0 41 0;
#P connect 41 0 8 0;
#P connect 13 0 3 0;
#P connect 3 0 2 0;
#P hidden fasten 8 0 22 0 152 83 274 83;
#P connect 22 0 13 2;
#P hidden fasten 8 0 23 0 152 83 295 83;
#P connect 23 0 13 3;
#P hidden fasten 8 0 24 0 152 83 316 83;
#P connect 24 0 13 4;
#P hidden fasten 8 0 14 0 152 83 337 83;
#P connect 14 0 13 5;
#P hidden fasten 8 0 15 0 152 83 358 83;
#P connect 15 0 13 6;
#P hidden fasten 8 0 16 0 152 83 379 83;
#P connect 16 0 13 7;
#P hidden fasten 8 0 17 0 152 83 400 83;
#P connect 17 0 13 8;
#P hidden fasten 8 0 18 0 152 83 421 83;
#P connect 18 0 13 9;
#P hidden fasten 8 0 19 0 152 83 442 83;
#P connect 19 0 13 10;
#P hidden fasten 8 0 20 0 152 83 463 83;
#P connect 20 0 13 11;
#P hidden fasten 8 0 21 0 152 83 484 83;
#P connect 21 0 13 12;
#P hidden fasten 8 0 39 0 152 83 505 83;
#P connect 39 0 13 13;
#P pop;
#P newobj 86 463 152 196617 patcher DIGITAL-OUTPUT;
#N vpatcher 259 192 968 558;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P comment 385 193 24 196618 13;
#P user led 387 173 17 17 1 150;
#P comment 364 193 24 196618 12;
#P comment 345 193 39 196618 11;
#P comment 323 193 23 196618 10;
#P comment 303 193 14 196618 9;
#P comment 282 193 14 196618 8;
#P comment 261 193 14 196618 7;
#P comment 240 193 14 196618 6;
#P comment 220 193 14 196618 5;
#P comment 197 193 14 196618 4;
#P comment 177 193 14 196618 3;
#P comment 155 193 14 196618 2;
#P comment 134 193 14 196618 1;
#P comment 134 173 18 196618 Tx;
#B frgb 0 166 41;
#P user panel 135 173 16 16;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user led 198 173 17 17 1 150;
#P user led 177 173 17 17 1 150;
#P user led 156 173 17 17 1 150;
#P user led 366 173 17 17 1 150;
#P user led 345 173 17 17 1 150;
#P user led 324 173 17 17 1 150;
#P user led 303 173 17 17 1 150;
#P user led 282 173 17 17 1 150;
#P user led 261 173 17 17 1 150;
#P user led 240 173 17 17 1 150;
#P user led 219 173 17 17 1 150;
#P comment 114 173 18 196618 Rx;
#B frgb 198 0 5;
#P user panel 114 173 16 16;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 114 193 14 196618 0;
#P newex 114 146 306 196618 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13;
#P window linecount 0;
#P newex 114 97 157 196618 r $0-arduino-out;
#P comment 455 153 193 196618 connect the Digital Input;
#P comment 455 170 150 196618 to the ground (=0) or to;
#P comment 455 187 172 196618 the positive voltage (=1);
#P comment 114 257 441 196618 NOTE: if you connect your pin neither to + nor to the ground \, you will get random values (0 or 1) - to avoid that \, you could connect all the pins to the ground !;
#P comment 114 69 268 196618 NOTE: don't forget to set pins to input mode first!;
#P newex 114 119 96 196618 route digital;
#P connect 6 0 0 0;
#P connect 0 0 7 0;
#P connect 7 2 19 0;
#P connect 7 3 20 0;
#P connect 7 4 21 0;
#P connect 7 5 11 0;
#P connect 7 6 12 0;
#P connect 7 7 13 0;
#P connect 7 8 14 0;
#P connect 7 9 15 0;
#P connect 7 10 16 0;
#P connect 7 11 17 0;
#P connect 7 12 18 0;
#P connect 7 13 36 0;
#P pop;
#P newobj 86 439 152 196617 patcher DIGITAL-INPUT;
#P comment 537 391 170 196617 (0=input \, 1=output);
#P message 664 499 77 196617 pinMode 13 1;
#P comment 749 500 148 196617 set pin 13 to output mode;
#P comment 537 376 251 196617 Set input/output mode of the pins for digital IO:;
#N vpatcher 503 171 1108 526;
#P origin 0 13;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P comment 373 220 14 196618 5;
#P comment 335 220 14 196618 4;
#P comment 297 220 14 196618 3;
#P comment 259 220 14 196618 2;
#P comment 221 220 14 196618 1;
#P comment 183 220 14 196618 0;
#N vpatcher 249 119 524 334;
#P window setfont "Sans Serif" 10.;
#P newex 59 79 100 196618 route 0 1 2 3 4 5;
#N vpatcher 111 209 910 408;
#P outlet 605 94 15 0;
#P inlet 605 51 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 295 310 578 574;
#P window setfont "Sans Serif" 10.;
#P newex 104 63 48 196618 loadbang;
#P newex 104 88 63 196618 qmetro 100;
#P outlet 62 164 15 0;
#P newex 62 134 27 196618 0.;
#P inlet 79 63 15 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 0 0 1 1;
#P connect 4 0 3 0;
#P pop;
#P newobj 605 71 107 196617 p metro_display_100;
#P objectname metro_display_100[4];
#P outlet 492 94 15 0;
#P inlet 492 51 15 0;
#N vpatcher 295 310 578 574;
#P window setfont "Sans Serif" 10.;
#P newex 104 63 48 196618 loadbang;
#P newex 104 88 63 196618 qmetro 100;
#P outlet 62 164 15 0;
#P newex 62 134 27 196618 0.;
#P inlet 79 63 15 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 0 0 1 1;
#P connect 4 0 3 0;
#P pop;
#P newobj 492 71 107 196617 p metro_display_100;
#P objectname metro_display_100[5];
#P outlet 379 94 15 0;
#P inlet 379 51 15 0;
#N vpatcher 295 310 578 574;
#P window setfont "Sans Serif" 10.;
#P newex 104 63 48 196618 loadbang;
#P newex 104 88 63 196618 qmetro 100;
#P outlet 62 164 15 0;
#P newex 62 134 27 196618 0.;
#P inlet 79 63 15 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 0 0 1 1;
#P connect 4 0 3 0;
#P pop;
#P newobj 379 71 107 196617 p metro_display_100;
#P objectname metro_display_100[2];
#P outlet 266 94 15 0;
#P inlet 266 51 15 0;
#N vpatcher 295 310 578 574;
#P window setfont "Sans Serif" 10.;
#P newex 104 63 48 196618 loadbang;
#P newex 104 88 63 196618 qmetro 100;
#P outlet 62 164 15 0;
#P newex 62 134 27 196618 0.;
#P inlet 79 63 15 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 0 0 1 1;
#P connect 4 0 3 0;
#P pop;
#P newobj 266 71 107 196617 p metro_display_100;
#P objectname metro_display_100[3];
#P outlet 152 94 15 0;
#P inlet 152 51 15 0;
#N vpatcher 295 310 578 574;
#P window setfont "Sans Serif" 10.;
#P newex 104 63 48 196618 loadbang;
#P newex 104 88 63 196618 qmetro 100;
#P outlet 62 164 15 0;
#P newex 62 134 27 196618 0.;
#P inlet 79 63 15 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 0 0 1 1;
#P connect 4 0 3 0;
#P pop;
#P newobj 152 71 107 196617 p metro_display_100;
#P objectname metro_display_100[1];
#P outlet 39 94 15 0;
#P inlet 39 51 15 0;
#P window linecount 0;
#N vpatcher 295 310 578 574;
#P window setfont "Sans Serif" 10.;
#P newex 104 63 48 196618 loadbang;
#P newex 104 88 63 196618 qmetro 100;
#P outlet 62 164 15 0;
#P newex 62 134 27 196618 0.;
#P inlet 79 63 15 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 0 0 1 1;
#P connect 4 0 3 0;
#P pop;
#P newobj 39 71 107 196617 p metro_display_100;
#P objectname metro_display_100;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P connect 7 0 6 0;
#P connect 6 0 8 0;
#P connect 10 0 9 0;
#P connect 9 0 11 0;
#P connect 13 0 12 0;
#P connect 12 0 14 0;
#P connect 16 0 15 0;
#P connect 15 0 17 0;
#P pop;
#P newobj 59 103 86 196618 p metro_update;
#P objectname "display values without pegging the CPU";
#P inlet 59 59 15 0;
#P outlet 144 127 15 0;
#P outlet 127 127 15 0;
#P outlet 110 127 15 0;
#P outlet 93 127 15 0;
#P outlet 76 127 15 0;
#P outlet 59 127 15 0;
#P connect 6 0 8 0;
#P connect 8 0 7 0;
#P connect 7 0 0 0;
#P connect 8 1 7 1;
#P connect 7 1 1 0;
#P connect 8 2 7 2;
#P connect 7 2 2 0;
#P connect 8 3 7 3;
#P connect 7 3 3 0;
#P connect 8 4 7 4;
#P connect 7 4 4 0;
#P connect 8 5 7 5;
#P connect 7 5 5 0;
#P pop;
#P newobj 175 174 203 196618 p display-analog-ins;
#P flonum 365 200 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 327 200 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 289 200 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 251 200 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 213 200 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 175 200 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P newex 175 116 29 196618 gate;
#P newex 194 81 101 196618 r $0-arduino-out;
#P toggle 162 83 20 0;
#P comment 87 39 221 196618 Analog Inputs of the Arduino-Board:;
#P comment 47 84 110 196618 enable analog inputs;
#P comment 79 283 310 196618 NOTE: connect the analog pins that you don't use to the ground \, if you want to avoid flickering of the values !;
#P newex 175 147 83 196618 route analog;
#P comment 46 63 403 196618 NOTE: first turn on analog inputs in 'patcher SWITCHing-INPUTS';
#P connect 5 0 7 0;
#P connect 7 0 1 0;
#P connect 1 0 14 0;
#P connect 14 0 8 0;
#P connect 6 0 7 1;
#P connect 14 1 9 0;
#P connect 14 2 10 0;
#P connect 14 3 11 0;
#P connect 14 4 12 0;
#P connect 14 5 13 0;
#P pop;
#P newobj 86 487 152 196617 patcher ANALOG-INPUT;
#P window setfont "Sans Serif" 10.;
#P window linecount 2;
#P comment 86 363 291 196618 With the Arduino-Board you can do digital and analog input and output \, as descriped in the following sub-patches:;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 244 467 182 196617 <- example of Digital Output;
#P comment 244 443 150 196617 <- example of Digital Input;
#P comment 244 491 187 196617 <- example of Analog Input;
#P comment 244 516 182 196617 <- example of Analog Output;
#P window setfont "Sans Serif" 10.;
#P comment 90 63 202 196618 Arduino Interface For Pd and Max/MSP;
#P window setfont "Sans Serif" 18.;
#P comment 90 34 243 196626 ::::_PDUINO FOR MAX_::::;
#P window setfont "Sans Serif" 9.;
#P comment 633 224 91 196617 <- list devices;
#P hidden newex 360 272 116 196617 send $0-arduino-out;
#P hidden newex 360 213 109 196617 receive $0-arduino;
#N vpatcher 92 304 460 676;
#P window setfont "Sans Serif" 9.;
#P number 106 246 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 69 246 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 10.;
#P message 70 75 50 196618 version;
#P message 130 75 50 196618 info;
#P newex 69 187 76 196618 route version;
#P newex 69 156 131 196618 receive $0-arduino-out;
#P newex 70 117 94 196618 send $0-arduino;
#P newex 69 217 44 196618 unpack;
#P connect 2 0 3 0;
#P connect 3 0 0 0;
#P connect 0 0 6 0;
#P connect 5 0 1 0;
#P connect 4 0 1 0;
#P connect 0 1 7 0;
#P pop;
#P newobj 86 536 152 196617 patcher GETTING-INFO;
#P comment 244 540 182 196617 <- example of getting status data;
#N vpatcher 307 242 903 610;
#P window setfont "Sans Serif" 10.;
#P comment 302 82 249 196618 view incoming data in 'patcher DIGITAL INPUTS';
#P comment 43 82 232 196618 view incoming data in 'patcher ANLOG INPUTS';
#P window linecount 0;
#P comment 153 103 14 196618 5;
#P comment 131 103 14 196618 4;
#P comment 109 103 14 196618 3;
#P comment 87 103 14 196618 2;
#P comment 66 103 14 196618 1;
#P comment 44 103 14 196618 0;
#N vpatcher 620 155 950 455;
#P window setfont "Sans Serif" 10.;
#P newex 67 147 62 196618 prepend set;
#P newex 67 174 30 196618 t b l;
#P message 67 124 94 196618 analogIns \$1 \$2;
#P message 67 86 34 196618 0 \$1;
#P message 102 86 34 196618 1 \$1;
#P message 137 86 34 196618 2 \$1;
#P message 172 86 34 196618 3 \$1;
#P message 207 86 34 196618 4 \$1;
#P message 242 86 34 196618 5 \$1;
#P inlet 242 66 15 0;
#P inlet 207 66 15 0;
#P inlet 172 66 15 0;
#P inlet 137 66 15 0;
#P inlet 102 66 15 0;
#P inlet 67 66 15 0;
#P outlet 67 198 15 0;
#P connect 1 0 12 0;
#P connect 12 0 13 0;
#P connect 11 0 13 0;
#P connect 10 0 13 0;
#P connect 9 0 13 0;
#P connect 8 0 13 0;
#P connect 7 0 13 0;
#P connect 13 0 15 0;
#P connect 15 0 14 0;
#P connect 14 1 0 0;
#P connect 14 0 0 0;
#P connect 2 0 11 0;
#P connect 3 0 10 0;
#P connect 4 0 9 0;
#P connect 5 0 8 0;
#P connect 6 0 7 0;
#P pop;
#P newobj 43 141 121 196618 p enable-analog-ins;
#P toggle 43 119 15 0;
#P toggle 65 119 15 0;
#P toggle 87 119 15 0;
#P toggle 109 119 15 0;
#P toggle 131 119 15 0;
#P toggle 153 119 15 0;
#P comment 43 63 159 196618 which analogIns to enable:;
#P newex 133 249 125 196618 send $0-arduino;
#P toggle 302 119 15 0;
#P comment 302 63 154 196618 enable/disable digitalIns;
#P message 302 141 128 196618 digitalIns \$1;
#P window linecount 1;
#P message 43 167 83 196618 analogIns 0 1;
#P connect 11 0 12 0;
#P connect 12 0 0 0;
#P connect 10 0 12 1;
#P connect 9 0 12 2;
#P connect 8 0 12 3;
#P connect 7 0 12 4;
#P fasten 1 0 4 0 307 211 138 211;
#P fasten 0 0 4 0 48 211 138 211;
#P connect 6 0 12 5;
#P connect 3 0 1 0;
#P pop;
#P newobj 86 414 151 196617 patcher SWITCHING-INPUTS;
#P comment 244 418 215 196617 <- example of switching inputs on and off;
#P message 664 543 75 196617 digital 13 \$1;
#P toggle 664 525 15 0;
#P comment 749 543 134 196617 toggle pin 13 on and off;
#P newex 360 248 57 196617 arduino 0;
#P message 578 224 36 196617 print;
#P message 578 249 50 196617 version;
#P comment 633 249 146 196617 <- get firmware version;
#N vpatcher 332 295 934 667;
#P outlet 51 199 15 0;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P newex 51 170 62 196618 prepend set;
#P newex 51 145 176 196618 sprintf firmata_version_%s.%s;
#P window linecount 0;
#P newex 51 118 104 196618 route version;
#P newex 51 93 184 196618 receive $0-arduino-out;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P pop;
#P newobj 578 275 95 196617 patcher ver;
#P user panel 85 30 275 53;
#X brgb 255 200 150;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden connect 82 1 87 0;
#P hidden connect 87 0 88 0;
#P hidden connect 85 0 83 0;
#P hidden connect 86 0 82 0;
#P hidden connect 87 0 84 0;
#P hidden connect 88 0 84 0;
#P hidden connect 84 0 43 0;
#P hidden connect 83 0 86 0;
#P hidden connect 32 0 31 0;
#P hidden connect 13 0 5 0;
#P fasten 4 0 5 0 583 245 564 245 564 239 365 239;
#P fasten 3 0 5 0 583 270 564 270 564 239 365 239;
#P fasten 47 0 5 0 543 522 510 522 510 239 365 239;
#P fasten 26 0 5 0 669 522 510 522 510 239 365 239;
#P fasten 8 0 5 0 669 565 510 565 510 239 365 239;
#P hidden connect 5 0 14 0;
#P hidden connect 38 0 37 0;
#P connect 46 0 47 0;
#P connect 1 0 44 0;
#P connect 59 0 46 2;
#P connect 58 0 46 3;
#P connect 57 0 46 4;
#P connect 56 0 46 5;
#P connect 55 0 46 6;
#P connect 7 0 8 0;
#P connect 54 0 46 7;
#P connect 53 0 46 8;
#P connect 52 0 46 9;
#P connect 51 0 46 10;
#P connect 50 0 46 11;
#P connect 49 0 46 12;
#P connect 48 0 46 13;
#P pop;