Forums > MaxMSP

Maxuino Help [Patch included]

November 14, 2007 | 8:30 pm

I’m trying to get it so that when the numbers on the left match the correct if/then statement, that LED will light up. The LEDs work when I click the toggle boxes by themselves, but not when I run the patch. Any ideas?

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 168 448 50 196617 bangbang;
#P toggle 49 461 15 0;
#P toggle 350 484 13 0;
#P toggle 174 493 15 0;
#P toggle 36 506 15 0;
#P newex 155 159 75 196617 * 127.99;
#P comment 87 16 65 196617 ? start audio;
#P flonum 154 126 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 154 104 73 196617 peakamp~ 125;
#B color 5;
#P flonum 69 126 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 35 74 15 0;
#P message 69 31 65 196617 startwindow;
#P message 140 31 27 196617 stop;
#P newex 69 66 32 196617 adc~;
#P newex 69 104 52 196617 peakamp~;
#B color 5;
#P user panel 59 10 123 43;
#X brgb 255 255 255;
#X frgb 100 202 30;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P newex 342 315 52 196617 t i i i;
#P newex 363 381 47 196617 == 0;
#P newex 363 360 47 196617 ||;
#P newex 342 402 31 196617 *;
#P newex 430 339 36 196617 > 500;
#P newex 363 338 36 196617 < 201;
#P number 342 296 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 155 307 52 196617 t i i i;
#P newex 176 373 47 196617 == 0;
#P newex 176 352 47 196617 ||;
#P newex 155 394 31 196617 *;
#P newex 245 329 36 196617 > 200;
#P newex 176 330 30 196617 < 50;
#P number 155 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 2 322 52 196617 t i i i;
#P newex 23 388 31 196617 == 1;
#P newex 23 367 47 196617 ||;
#P newex 2 409 31 196617 *;
#P newex 76 347 30 196617 > 50;
#P newex 23 345 27 196617 < 0;
#P number 1 286 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user gswitch2 1516 350 39 32 0 0;
#P flonum 1492 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user meter~ 1530 183 1561 241 100 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user meter~ 1488 182 1519 240 100 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P newex 1489 93 31 196617 adc~;
#P message 681 315 29 196617 stop;
#P button 645 313 15 0;
#P newex 647 355 58 196617 metro 250;
#P toggle 687 397 15 0;
#P hidden button 630 135 15 0;
#P hidden newex 630 113 84 196617 prepend set port;
#P window setfont "Sans Serif" 10.;
#P comment 649 165 96 196618 analog output;
#P toggle 648 483 15 0;
#P window setfont "Sans Serif" 9.;
#P message 653 600 44 196617 version;
#P window setfont "Sans Serif" 10.;
#P comment 1308 242 14 196618 5;
#P comment 1270 242 14 196618 4;
#P comment 1232 242 14 196618 3;
#P comment 1194 242 14 196618 2;
#P comment 1156 242 14 196618 1;
#P comment 1118 242 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 1110 196 203 196618 p display-analog-ins;
#P flonum 1300 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 1262 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 1224 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 1186 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 1148 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 1098 275 208 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 1381 438 24 196618 13;
#P user led 1383 418 17 17 1 150;
#P comment 1360 438 24 196618 12;
#P comment 1341 438 39 196618 11;
#P comment 1319 438 23 196618 10;
#P comment 1299 438 14 196618 9;
#P comment 1278 438 14 196618 8;
#P comment 1257 438 14 196618 7;
#P comment 1236 438 14 196618 6;
#P comment 1216 438 14 196618 5;
#P comment 1193 438 14 196618 4;
#P comment 1173 438 14 196618 3;
#P comment 1151 438 14 196618 2;
#P comment 1130 438 14 196618 1;
#P comment 1130 418 18 196618 Tx;
#B frgb 0 166 41;
#P user panel 1131 418 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 1194 418 17 17 1 150;
#P user led 1173 418 17 17 1 150;
#P user led 1152 418 17 17 1 150;
#P user led 1362 418 17 17 1 150;
#P user led 1341 418 17 17 1 150;
#P user led 1320 418 17 17 1 150;
#P user led 1299 418 17 17 1 150;
#P user led 1278 418 17 17 1 150;
#P user led 1257 418 17 17 1 150;
#P user led 1236 418 17 17 1 150;
#P user led 1215 418 17 17 1 150;
#P comment 1108 418 18 196618 Rx;
#B frgb 198 0 5;
#P user panel 1109 418 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 1110 438 14 196618 0;
#P toggle 1111 330 15 0;
#P comment 1106 311 155 196618 enable/disable digitalIns;
#P message 1111 356 73 196618 digitalIns $1;
#P user panel 1106 351 88 27;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#N vpatcher 10 59 391 317;
#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 6 0 5 0;
#P pop;
#P hidden newobj 830 77 52 196618 p devices;
#P hidden newex 741 78 48 196618 loadbang;
#P window linecount 5;
#P message 791 126 41 196618 port usbserial-A4001K5w;
#P window linecount 1;
#P message 790 79 32 196618 print;
#P user ubumenu 790 101 135 196618 0 1 1 0;
#X add modem;
#X add usbserial-A4001K5w;
#X add Bluetooth-PDA-Sync;
#X add Bluetooth-Modem;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P window linecount 3;
#P comment 640 102 143 196618 alternatively you can send a message "port" + portnumber (0 , 1 , 2);
#P window linecount 1;
#P comment 789 59 100 196618 select serial port;
#P user panel 787 122 184 26;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 1223 87 14 196618 5;
#P comment 1201 87 14 196618 4;
#P comment 1179 87 14 196618 3;
#P comment 1157 87 14 196618 2;
#P comment 1136 87 14 196618 1;
#P comment 1114 87 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 1113 128 121 196618 p enable-analog-ins;
#P toggle 1113 106 15 0;
#P toggle 1135 106 15 0;
#P toggle 1157 106 15 0;
#P toggle 1179 106 15 0;
#P toggle 1201 106 15 0;
#P toggle 1223 106 15 0;
#P message 1113 158 83 196618 analogIns 4 1;
#P comment 1113 61 159 196618 which analogIns to enable:;
#P user panel 1109 153 101 28;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 989 333 24 196618 13;
#P comment 969 333 24 196618 12;
#P comment 951 333 39 196618 11;
#P comment 930 333 23 196618 10;
#P comment 912 333 14 196618 9;
#P comment 893 333 14 196618 8;
#P comment 872 333 14 196618 7;
#P comment 853 333 14 196618 6;
#P comment 833 333 14 196618 5;
#P comment 813 333 14 196618 4;
#P comment 793 333 14 196618 3;
#P comment 773 333 14 196618 2;
#P comment 752 333 14 196618 1;
#P comment 752 353 18 196618 Tx;
#B frgb 0 166 41;
#P user panel 753 353 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 729 353 18 196618 Rx;
#B frgb 198 0 5;
#P user panel 730 353 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 731 333 14 196618 0;
#P toggle 772 353 15 0;
#P toggle 792 353 15 0;
#P toggle 812 353 15 0;
#P toggle 832 353 15 0;
#P toggle 852 353 15 0;
#P toggle 872 353 15 0;
#P toggle 892 353 15 0;
#P toggle 912 353 15 0;
#P toggle 932 353 15 0;
#P toggle 952 353 15 0;
#P toggle 972 353 15 0;
#P toggle 992 353 15 0;
#P comment 731 315 288 196618 turn on output mode for each pin (off=input);
#P message 732 405 79 196618 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 732 377 271 196618 p send-to-arduino;
#P user panel 729 400 101 28;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 997 440 24 196618 13;
#P user led 1001 460 17 17 1 150;
#P comment 976 440 24 196618 12;
#P comment 957 440 39 196618 11;
#P comment 935 440 23 196618 10;
#P comment 915 440 14 196618 9;
#P comment 894 440 14 196618 8;
#P comment 873 440 14 196618 7;
#P comment 852 440 14 196618 6;
#P comment 832 440 14 196618 5;
#P comment 809 440 14 196618 4;
#P comment 789 440 14 196618 3;
#P comment 767 440 14 196618 2;
#P comment 746 440 14 196618 1;
#P comment 748 460 18 196618 Tx;
#B frgb 0 166 41;
#P user panel 749 460 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 791 460 17 17 1 150;
#P user led 770 460 17 17 1 150;
#P user led 980 460 17 17 1 150;
#P user led 959 460 17 17 1 150;
#P user led 917 460 17 17 1 150;
#P user led 896 460 17 17 1 150;
#P user led 875 460 17 17 1 150;
#P message 728 511 81 196618 digital 5 0;
#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 733 487 286 196618 p generate;
#P newex 648 460 63 196618 metro 100;
#P comment 725 460 18 196618 Rx;
#B frgb 198 0 5;
#P user panel 726 460 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 725 440 14 196618 0;
#P user led 648 503 17 17 1 150;
#P comment 669 503 39 196618 ALL;
#P user panel 723 505 101 28;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P toggle 648 441 15 0;
#P hidden newex 726 601 62 196618 prepend set;
#P message 653 634 119 196618 firmata_version_1.0;
#P hidden newex 726 578 176 196618 sprintf firmata_version_%s.%s;
#P hidden newex 726 554 76 196618 route version;
#P user panel 648 632 130 22;
#X brgb 170 157 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user umenu 649 204 66 196651 1 64 221 1;
#X add pin 2;
#X add pin 3;
#X add pin 4;
#X add pin 5;
#X add pin 6;
#X add pin 7;
#X add pin 8;
#X add pin 9;
#X add pin 10;
#X add pin 11;
#X add pin 12;
#X add pin 13;
#P hidden newex 771 229 41 196618 * 0.01;
#P user hslider 771 204 18 128 101 1 0 0;
#P message 718 204 50 196618 off;
#N vpatcher 497 272 859 779;
#P window setfont "Sans Serif" 10.;
#P newex 67 81 27 196618 + 2;
#P newex 147 327 92 196618 prepend set pwm;
#P newex 147 254 27 196618 2;
#P newex 211 254 27 196618 2;
#P button 211 130 15 0;
#P window linecount 1;
#P message 180 127 14 196618 2;
#P window linecount 0;
#P message 124 127 14 196618 1;
#P newex 56 185 38 196618 gate 2;
#P window linecount 1;
#P newex 211 280 42 196618 zl join;
#P newex 147 180 30 196618 t b f;
#P window linecount 0;
#P newex 211 181 38 196618 t b off;
#P newex 147 93 77 196618 route float off;
#N comlet pin#;
#P inlet 67 60 15 0;
#P inlet 147 62 15 0;
#P newex 147 280 42 196618 zl join;
#P comment 76 104 50 196618 pin#;
#P comment 174 61 121 196618 PWM value or "off";
#P outlet 147 405 15 0;
#P newex 147 360 30 196618 t b l;
#P connect 12 0 11 0;
#P connect 13 0 11 0;
#P connect 6 0 18 0;
#P connect 18 0 11 1;
#P connect 7 0 12 0;
#P connect 5 0 7 0;
#P connect 7 0 9 0;
#P connect 11 0 16 0;
#P connect 9 0 16 0;
#P connect 16 0 4 0;
#P connect 10 0 17 0;
#P connect 4 0 17 0;
#P connect 17 0 0 0;
#P connect 0 1 1 0;
#P connect 0 0 1 0;
#P connect 11 1 16 1;
#P connect 9 1 4 1;
#P connect 7 1 13 0;
#P connect 7 1 14 0;
#P connect 14 0 8 0;
#P connect 8 0 15 0;
#P connect 11 1 15 0;
#P connect 15 0 10 0;
#P connect 11 0 15 1;
#P connect 8 1 10 1;
#P pop;
#P newobj 649 231 42 196618 p pwm;
#P message 649 259 75 196618 pwm 11 off;
#P user panel 646 254 101 28;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 897 664 148 196618 released under the GNU GPL;
#P comment 1133 552 149 196618 argument sets serial port #;
#P window linecount 2;
#P comment 647 25 310 196618 The [arduino] object works with the Firmata firmware for Arduino (previously known as Pduino firmware).;
#P window linecount 1;
#P newex 1384 139 103 196618 route analog digital;
#P newex 1110 391 306 196618 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13;
#P comment 653 663 239 196618 (C) Copyright 2006 Free Software Foundation;
#P newex 1067 551 57 196618 arduino 0;
#P comment 649 185 373 196618 pins 9 , 10 and 11 will output PWM , other pins switch between on and off;
#P connect 208 1 205 0;
#P connect 182 0 208 0;
#P connect 207 0 204 0;
#P connect 175 0 207 0;
#P connect 176 0 177 0;
#P connect 177 0 175 1;
#P connect 205 0 28 5;
#P connect 206 0 28 6;
#P connect 204 0 28 4;
#P hidden fasten 23 0 35 0 653 464 775 464;
#P hidden fasten 23 0 36 0 653 464 796 464;
#P hidden fasten 23 0 30 0 653 464 880 464;
#P hidden fasten 23 0 31 0 653 464 901 464;
#P hidden fasten 23 0 32 0 653 464 922 464;
#P hidden fasten 23 0 33 0 653 464 964 464;
#P hidden fasten 23 0 34 0 653 464 985 464;
#P hidden fasten 23 0 51 0 653 551 1006 551;
#P connect 203 0 172 0;
#P connect 203 0 179 0;
#P connect 203 0 186 0;
#P connect 195 0 194 0;
#P fasten 195 0 200 0 74 89 159 89;
#P fasten 192 2 188 0 389 313 435 313;
#P connect 188 0 190 1;
#P connect 191 0 189 1;
#P connect 190 0 191 0;
#P connect 187 0 190 0;
#P connect 192 1 187 0;
#P connect 192 0 189 0;
#P connect 186 0 192 0;
#P fasten 185 2 181 0 202 305 250 305;
#P connect 181 0 183 1;
#P connect 184 0 182 1;
#P connect 183 0 184 0;
#P connect 180 0 183 0;
#P connect 185 1 180 0;
#P connect 185 0 182 0;
#P connect 179 0 185 0;
#P connect 201 0 203 0;
#P connect 200 0 201 0;
#P fasten 178 2 174 0 49 342 81 342;
#P connect 194 0 199 0;
#P fasten 198 0 194 0 40 99 74 99;
#P connect 197 0 195 0;
#P fasten 196 0 195 0 145 61 74 61;
#P connect 174 0 176 1;
#P connect 173 0 176 0;
#P connect 178 1 173 0;
#P connect 178 0 175 0;
#P connect 172 0 178 0;
#P connect 167 1 169 0;
#P connect 168 0 170 0;
#P connect 167 0 168 0;
#P hidden fasten 1 0 16 0 1072 544 731 544;
#P fasten 1 0 4 0 1072 585 1452 585 1452 131 1389 131;
#P connect 3 13 143 0;
#P connect 3 12 125 0;
#P connect 3 11 124 0;
#P connect 3 10 123 0;
#P connect 151 5 150 0;
#P connect 3 9 122 0;
#P connect 3 8 121 0;
#P connect 151 4 149 0;
#P connect 3 7 120 0;
#P connect 3 6 119 0;
#P connect 151 3 148 0;
#P connect 90 0 96 5;
#P connect 3 5 118 0;
#P connect 91 0 96 4;
#P connect 3 4 128 0;
#P connect 151 2 147 0;
#P connect 92 0 96 3;
#P connect 3 3 127 0;
#P connect 93 0 96 2;
#P connect 3 2 126 0;
#P connect 151 1 146 0;
#P connect 94 0 96 1;
#P connect 96 0 89 0;
#P connect 95 0 96 0;
#P connect 114 0 112 0;
#P fasten 4 1 3 0 1435 383 1115 383;
#P fasten 4 0 151 0 1389 188 1115 188;
#P connect 151 0 145 0;
#P fasten 29 0 1 0 733 539 1072 539;
#P fasten 158 0 1 0 658 619 865 619 865 619 1042 619 1042 539 1072 539;
#P fasten 9 0 1 0 654 299 1072 299;
#P fasten 55 0 1 0 737 432 1072 432;
#P fasten 89 0 1 0 1118 183 1072 183;
#P fasten 112 0 1 0 1116 379 1072 379;
#P fasten 108 0 1 0 796 154 1072 154;
#P connect 51 0 28 13;
#P connect 57 0 54 13;
#P connect 34 0 28 12;
#P connect 58 0 54 12;
#P connect 33 0 28 11;
#P connect 59 0 54 11;
#P connect 163 0 28 10;
#P connect 60 0 54 10;
#P connect 32 0 28 9;
#P connect 61 0 54 9;
#P connect 31 0 28 8;
#P connect 62 0 54 8;
#P connect 30 0 28 7;
#P connect 63 0 54 7;
#P connect 64 0 54 6;
#P connect 65 0 54 5;
#P hidden connect 107 0 110 0;
#P connect 66 0 54 4;
#P connect 36 0 28 3;
#P connect 67 0 54 3;
#P hidden connect 162 0 108 0;
#P hidden connect 161 0 162 0;
#P hidden connect 161 0 108 0;
#P hidden connect 110 0 106 0;
#P hidden connect 109 0 107 0;
#P connect 35 0 28 2;
#P connect 68 0 54 2;
#P hidden connect 12 0 13 0;
#P connect 54 0 55 0;
#P connect 28 0 29 0;
#P hidden connect 17 0 19 0;
#P hidden connect 16 0 17 0;
#P connect 164 0 163 0;
#P hidden fasten 11 0 10 1 723 226 686 226;
#P hidden connect 13 0 10 1;
#P hidden connect 19 0 18 0;
#P connect 10 0 9 0;
#P connect 14 0 10 0;
#P connect 159 0 23 0;
#P connect 27 0 159 0;
#P connect 20 0 27 0;
#P connect 165 0 164 0;
#P connect 166 0 164 0;
#P hidden connect 106 1 161 0;
#P window clipboard copycount 209;


November 14, 2007 | 9:10 pm

hi,
hmm, before you can play with the outputs make sure, that you turn the
pins to output mode (default is to input). in your patch that would be
4,5,6 above the output.
then also when you use a toggle in connection with bang you are sending
alternate on off messages, maybe you just want to send 1 when the
if/then statement is true and 0 when it is false.
otherwise, the patch does not look bad, is it not working at all?
marius.

nk_snyder wrote:
> I’m trying to get it so that when the numbers on the left match the correct if/then statement, that LED will light up. The LEDs work when I click the toggle boxes by themselves, but not when I run the patch. Any ideas?
>
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 168 448 50 196617 bangbang;
> #P toggle 49 461 15 0;
> #P toggle 350 484 13 0;
> #P toggle 174 493 15 0;
> #P toggle 36 506 15 0;
> #P newex 155 159 75 196617 * 127.99;
> #P comment 87 16 65 196617 ? start audio;
> #P flonum 154 126 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 154 104 73 196617 peakamp~ 125;
> #B color 5;
> #P flonum 69 126 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 35 74 15 0;
> #P message 69 31 65 196617 startwindow;
> #P message 140 31 27 196617 stop;
> #P newex 69 66 32 196617 adc~;
> #P newex 69 104 52 196617 peakamp~;
> #B color 5;
> #P user panel 59 10 123 43;
> #X brgb 255 255 255;
> #X frgb 100 202 30;
> #X border 2;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P newex 342 315 52 196617 t i i i;
> #P newex 363 381 47 196617 == 0;
> #P newex 363 360 47 196617 ||;
> #P newex 342 402 31 196617 *;
> #P newex 430 339 36 196617 > 500;
> #P newex 363 338 36 196617 < 201;
> #P number 342 296 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 155 307 52 196617 t i i i;
> #P newex 176 373 47 196617 == 0;
> #P newex 176 352 47 196617 ||;
> #P newex 155 394 31 196617 *;
> #P newex 245 329 36 196617 > 200;
> #P newex 176 330 30 196617 < 50;
> #P number 155 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 2 322 52 196617 t i i i;
> #P newex 23 388 31 196617 == 1;
> #P newex 23 367 47 196617 ||;
> #P newex 2 409 31 196617 *;
> #P newex 76 347 30 196617 > 50;
> #P newex 23 345 27 196617 < 0;
> #P number 1 286 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P user gswitch2 1516 350 39 32 0 0;
> #P flonum 1492 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P user meter~ 1530 183 1561 241 100 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
> #P user meter~ 1488 182 1519 240 100 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
> #P newex 1489 93 31 196617 adc~;
> #P message 681 315 29 196617 stop;
> #P button 645 313 15 0;
> #P newex 647 355 58 196617 metro 250;
> #P toggle 687 397 15 0;
> #P hidden button 630 135 15 0;
> #P hidden newex 630 113 84 196617 prepend set port;
> #P window setfont "Sans Serif" 10.;
> #P comment 649 165 96 196618 analog output;
> #P toggle 648 483 15 0;
> #P window setfont "Sans Serif" 9.;
> #P message 653 600 44 196617 version;
> #P window setfont "Sans Serif" 10.;
> #P comment 1308 242 14 196618 5;
> #P comment 1270 242 14 196618 4;
> #P comment 1232 242 14 196618 3;
> #P comment 1194 242 14 196618 2;
> #P comment 1156 242 14 196618 1;
> #P comment 1118 242 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 1110 196 203 196618 p display-analog-ins;
> #P flonum 1300 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 1262 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 1224 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 1186 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 1148 222 35 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 1098 275 208 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 1381 438 24 196618 13;
> #P user led 1383 418 17 17 1 150;
> #P comment 1360 438 24 196618 12;
> #P comment 1341 438 39 196618 11;
> #P comment 1319 438 23 196618 10;
> #P comment 1299 438 14 196618 9;
> #P comment 1278 438 14 196618 8;
> #P comment 1257 438 14 196618 7;
> #P comment 1236 438 14 196618 6;
> #P comment 1216 438 14 196618 5;
> #P comment 1193 438 14 196618 4;
> #P comment 1173 438 14 196618 3;
> #P comment 1151 438 14 196618 2;
> #P comment 1130 438 14 196618 1;
> #P comment 1130 418 18 196618 Tx;
> #B frgb 0 166 41;
> #P user panel 1131 418 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 1194 418 17 17 1 150;
> #P user led 1173 418 17 17 1 150;
> #P user led 1152 418 17 17 1 150;
> #P user led 1362 418 17 17 1 150;
> #P user led 1341 418 17 17 1 150;
> #P user led 1320 418 17 17 1 150;
> #P user led 1299 418 17 17 1 150;
> #P user led 1278 418 17 17 1 150;
> #P user led 1257 418 17 17 1 150;
> #P user led 1236 418 17 17 1 150;
> #P user led 1215 418 17 17 1 150;
> #P comment 1108 418 18 196618 Rx;
> #B frgb 198 0 5;
> #P user panel 1109 418 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 1110 438 14 196618 0;
> #P toggle 1111 330 15 0;
> #P comment 1106 311 155 196618 enable/disable digitalIns;
> #P message 1111 356 73 196618 digitalIns $1;
> #P user panel 1106 351 88 27;
> #X brgb 255 247 207;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #N vpatcher 10 59 391 317;
> #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 6 0 5 0;
> #P pop;
> #P hidden newobj 830 77 52 196618 p devices;
> #P hidden newex 741 78 48 196618 loadbang;
> #P window linecount 5;
> #P message 791 126 41 196618 port usbserial-A4001K5w;
> #P window linecount 1;
> #P message 790 79 32 196618 print;
> #P user ubumenu 790 101 135 196618 0 1 1 0;
> #X add modem;
> #X add usbserial-A4001K5w;
> #X add Bluetooth-PDA-Sync;
> #X add Bluetooth-Modem;
> #X prefix_set 0 0 0;
> #X pattrmode 1;
> #P window linecount 3;
> #P comment 640 102 143 196618 alternatively you can send a message "port" + portnumber (0 , 1 , 2);
> #P window linecount 1;
> #P comment 789 59 100 196618 select serial port;
> #P user panel 787 122 184 26;
> #X brgb 255 247 207;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P comment 1223 87 14 196618 5;
> #P comment 1201 87 14 196618 4;
> #P comment 1179 87 14 196618 3;
> #P comment 1157 87 14 196618 2;
> #P comment 1136 87 14 196618 1;
> #P comment 1114 87 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 1113 128 121 196618 p enable-analog-ins;
> #P toggle 1113 106 15 0;
> #P toggle 1135 106 15 0;
> #P toggle 1157 106 15 0;
> #P toggle 1179 106 15 0;
> #P toggle 1201 106 15 0;
> #P toggle 1223 106 15 0;
> #P message 1113 158 83 196618 analogIns 4 1;
> #P comment 1113 61 159 196618 which analogIns to enable:;
> #P user panel 1109 153 101 28;
> #X brgb 255 247 207;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P comment 989 333 24 196618 13;
> #P comment 969 333 24 196618 12;
> #P comment 951 333 39 196618 11;
> #P comment 930 333 23 196618 10;
> #P comment 912 333 14 196618 9;
> #P comment 893 333 14 196618 8;
> #P comment 872 333 14 196618 7;
> #P comment 853 333 14 196618 6;
> #P comment 833 333 14 196618 5;
> #P comment 813 333 14 196618 4;
> #P comment 793 333 14 196618 3;
> #P comment 773 333 14 196618 2;
> #P comment 752 333 14 196618 1;
> #P comment 752 353 18 196618 Tx;
> #B frgb 0 166 41;
> #P user panel 753 353 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 729 353 18 196618 Rx;
> #B frgb 198 0 5;
> #P user panel 730 353 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 731 333 14 196618 0;
> #P toggle 772 353 15 0;
> #P toggle 792 353 15 0;
> #P toggle 812 353 15 0;
> #P toggle 832 353 15 0;
> #P toggle 852 353 15 0;
> #P toggle 872 353 15 0;
> #P toggle 892 353 15 0;
> #P toggle 912 353 15 0;
> #P toggle 932 353 15 0;
> #P toggle 952 353 15 0;
> #P toggle 972 353 15 0;
> #P toggle 992 353 15 0;
> #P comment 731 315 288 196618 turn on output mode for each pin (off=input);
> #P message 732 405 79 196618 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 732 377 271 196618 p send-to-arduino;
> #P user panel 729 400 101 28;
> #X brgb 255 247 207;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P comment 997 440 24 196618 13;
> #P user led 1001 460 17 17 1 150;
> #P comment 976 440 24 196618 12;
> #P comment 957 440 39 196618 11;
> #P comment 935 440 23 196618 10;
> #P comment 915 440 14 196618 9;
> #P comment 894 440 14 196618 8;
> #P comment 873 440 14 196618 7;
> #P comment 852 440 14 196618 6;
> #P comment 832 440 14 196618 5;
> #P comment 809 440 14 196618 4;
> #P comment 789 440 14 196618 3;
> #P comment 767 440 14 196618 2;
> #P comment 746 440 14 196618 1;
> #P comment 748 460 18 196618 Tx;
> #B frgb 0 166 41;
> #P user panel 749 460 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 791 460 17 17 1 150;
> #P user led 770 460 17 17 1 150;
> #P user led 980 460 17 17 1 150;
> #P user led 959 460 17 17 1 150;
> #P user led 917 460 17 17 1 150;
> #P user led 896 460 17 17 1 150;
> #P user led 875 460 17 17 1 150;
> #P message 728 511 81 196618 digital 5 0;
> #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 733 487 286 196618 p generate;
> #P newex 648 460 63 196618 metro 100;
> #P comment 725 460 18 196618 Rx;
> #B frgb 198 0 5;
> #P user panel 726 460 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 725 440 14 196618 0;
> #P user led 648 503 17 17 1 150;
> #P comment 669 503 39 196618 ALL;
> #P user panel 723 505 101 28;
> #X brgb 255 247 207;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P toggle 648 441 15 0;
> #P hidden newex 726 601 62 196618 prepend set;
> #P message 653 634 119 196618 firmata_version_1.0;
> #P hidden newex 726 578 176 196618 sprintf firmata_version_%s.%s;
> #P hidden newex 726 554 76 196618 route version;
> #P user panel 648 632 130 22;
> #X brgb 170 157 224;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user umenu 649 204 66 196651 1 64 221 1;
> #X add pin 2;
> #X add pin 3;
> #X add pin 4;
> #X add pin 5;
> #X add pin 6;
> #X add pin 7;
> #X add pin 8;
> #X add pin 9;
> #X add pin 10;
> #X add pin 11;
> #X add pin 12;
> #X add pin 13;
> #P hidden newex 771 229 41 196618 * 0.01;
> #P user hslider 771 204 18 128 101 1 0 0;
> #P message 718 204 50 196618 off;
> #N vpatcher 497 272 859 779;
> #P window setfont "Sans Serif" 10.;
> #P newex 67 81 27 196618 + 2;
> #P newex 147 327 92 196618 prepend set pwm;
> #P newex 147 254 27 196618 2;
> #P newex 211 254 27 196618 2;
> #P button 211 130 15 0;
> #P window linecount 1;
> #P message 180 127 14 196618 2;
> #P window linecount 0;
> #P message 124 127 14 196618 1;
> #P newex 56 185 38 196618 gate 2;
> #P window linecount 1;
> #P newex 211 280 42 196618 zl join;
> #P newex 147 180 30 196618 t b f;
> #P window linecount 0;
> #P newex 211 181 38 196618 t b off;
> #P newex 147 93 77 196618 route float off;
> #N comlet pin#;
> #P inlet 67 60 15 0;
> #P inlet 147 62 15 0;
> #P newex 147 280 42 196618 zl join;
> #P comment 76 104 50 196618 pin#;
> #P comment 174 61 121 196618 PWM value or "off";
> #P outlet 147 405 15 0;
> #P newex 147 360 30 196618 t b l;
> #P connect 12 0 11 0;
> #P connect 13 0 11 0;
> #P connect 6 0 18 0;
> #P connect 18 0 11 1;
> #P connect 7 0 12 0;
> #P connect 5 0 7 0;
> #P connect 7 0 9 0;
> #P connect 11 0 16 0;
> #P connect 9 0 16 0;
> #P connect 16 0 4 0;
> #P connect 10 0 17 0;
> #P connect 4 0 17 0;
> #P connect 17 0 0 0;
> #P connect 0 1 1 0;
> #P connect 0 0 1 0;
> #P connect 11 1 16 1;
> #P connect 9 1 4 1;
> #P connect 7 1 13 0;
> #P connect 7 1 14 0;
> #P connect 14 0 8 0;
> #P connect 8 0 15 0;
> #P connect 11 1 15 0;
> #P connect 15 0 10 0;
> #P connect 11 0 15 1;
> #P connect 8 1 10 1;
> #P pop;
> #P newobj 649 231 42 196618 p pwm;
> #P message 649 259 75 196618 pwm 11 off;
> #P user panel 646 254 101 28;
> #X brgb 255 247 207;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P comment 897 664 148 196618 released under the GNU GPL;
> #P comment 1133 552 149 196618 argument sets serial port #;
> #P window linecount 2;
> #P comment 647 25 310 196618 The [arduino] object works with the Firmata firmware for Arduino (previously known as Pduino firmware).;
> #P window linecount 1;
> #P newex 1384 139 103 196618 route analog digital;
> #P newex 1110 391 306 196618 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13;
> #P comment 653 663 239 196618 (C) Copyright 2006 Free Software Foundation;
> #P newex 1067 551 57 196618 arduino 0;
> #P comment 649 185 373 196618 pins 9 , 10 and 11 will output PWM , other pins switch between on and off;
> #P connect 208 1 205 0;
> #P connect 182 0 208 0;
> #P connect 207 0 204 0;
> #P connect 175 0 207 0;
> #P connect 176 0 177 0;
> #P connect 177 0 175 1;
> #P connect 205 0 28 5;
> #P connect 206 0 28 6;
> #P connect 204 0 28 4;
> #P hidden fasten 23 0 35 0 653 464 775 464;
> #P hidden fasten 23 0 36 0 653 464 796 464;
> #P hidden fasten 23 0 30 0 653 464 880 464;
> #P hidden fasten 23 0 31 0 653 464 901 464;
> #P hidden fasten 23 0 32 0 653 464 922 464;
> #P hidden fasten 23 0 33 0 653 464 964 464;
> #P hidden fasten 23 0 34 0 653 464 985 464;
> #P hidden fasten 23 0 51 0 653 551 1006 551;
> #P connect 203 0 172 0;
> #P connect 203 0 179 0;
> #P connect 203 0 186 0;
> #P connect 195 0 194 0;
> #P fasten 195 0 200 0 74 89 159 89;
> #P fasten 192 2 188 0 389 313 435 313;
> #P connect 188 0 190 1;
> #P connect 191 0 189 1;
> #P connect 190 0 191 0;
> #P connect 187 0 190 0;
> #P connect 192 1 187 0;
> #P connect 192 0 189 0;
> #P connect 186 0 192 0;
> #P fasten 185 2 181 0 202 305 250 305;
> #P connect 181 0 183 1;
> #P connect 184 0 182 1;
> #P connect 183 0 184 0;
> #P connect 180 0 183 0;
> #P connect 185 1 180 0;
> #P connect 185 0 182 0;
> #P connect 179 0 185 0;
> #P connect 201 0 203 0;
> #P connect 200 0 201 0;
> #P fasten 178 2 174 0 49 342 81 342;
> #P connect 194 0 199 0;
> #P fasten 198 0 194 0 40 99 74 99;
> #P connect 197 0 195 0;
> #P fasten 196 0 195 0 145 61 74 61;
> #P connect 174 0 176 1;
> #P connect 173 0 176 0;
> #P connect 178 1 173 0;
> #P connect 178 0 175 0;
> #P connect 172 0 178 0;
> #P connect 167 1 169 0;
> #P connect 168 0 170 0;
> #P connect 167 0 168 0;
> #P hidden fasten 1 0 16 0 1072 544 731 544;
> #P fasten 1 0 4 0 1072 585 1452 585 1452 131 1389 131;
> #P connect 3 13 143 0;
> #P connect 3 12 125 0;
> #P connect 3 11 124 0;
> #P connect 3 10 123 0;
> #P connect 151 5 150 0;
> #P connect 3 9 122 0;
> #P connect 3 8 121 0;
> #P connect 151 4 149 0;
> #P connect 3 7 120 0;
> #P connect 3 6 119 0;
> #P connect 151 3 148 0;
> #P connect 90 0 96 5;
> #P connect 3 5 118 0;
> #P connect 91 0 96 4;
> #P connect 3 4 128 0;
> #P connect 151 2 147 0;
> #P connect 92 0 96 3;
> #P connect 3 3 127 0;
> #P connect 93 0 96 2;
> #P connect 3 2 126 0;
> #P connect 151 1 146 0;
> #P connect 94 0 96 1;
> #P connect 96 0 89 0;
> #P connect 95 0 96 0;
> #P connect 114 0 112 0;
> #P fasten 4 1 3 0 1435 383 1115 383;
> #P fasten 4 0 151 0 1389 188 1115 188;
> #P connect 151 0 145 0;
> #P fasten 29 0 1 0 733 539 1072 539;
> #P fasten 158 0 1 0 658 619 865 619 865 619 1042 619 1042 539 1072 539;
> #P fasten 9 0 1 0 654 299 1072 299;
> #P fasten 55 0 1 0 737 432 1072 432;
> #P fasten 89 0 1 0 1118 183 1072 183;
> #P fasten 112 0 1 0 1116 379 1072 379;
> #P fasten 108 0 1 0 796 154 1072 154;
> #P connect 51 0 28 13;
> #P connect 57 0 54 13;
> #P connect 34 0 28 12;
> #P connect 58 0 54 12;
> #P connect 33 0 28 11;
> #P connect 59 0 54 11;
> #P connect 163 0 28 10;
> #P connect 60 0 54 10;
> #P connect 32 0 28 9;
> #P connect 61 0 54 9;
> #P connect 31 0 28 8;
> #P connect 62 0 54 8;
> #P connect 30 0 28 7;
> #P connect 63 0 54 7;
> #P connect 64 0 54 6;
> #P connect 65 0 54 5;
> #P hidden connect 107 0 110 0;
> #P connect 66 0 54 4;
> #P connect 36 0 28 3;
> #P connect 67 0 54 3;
> #P hidden connect 162 0 108 0;
> #P hidden connect 161 0 162 0;
> #P hidden connect 161 0 108 0;
> #P hidden connect 110 0 106 0;
> #P hidden connect 109 0 107 0;
> #P connect 35 0 28 2;
> #P connect 68 0 54 2;
> #P hidden connect 12 0 13 0;
> #P connect 54 0 55 0;
> #P connect 28 0 29 0;
> #P hidden connect 17 0 19 0;
> #P hidden connect 16 0 17 0;
> #P connect 164 0 163 0;
> #P hidden fasten 11 0 10 1 723 226 686 226;
> #P hidden connect 13 0 10 1;
> #P hidden connect 19 0 18 0;
> #P connect 10 0 9 0;
> #P connect 14 0 10 0;
> #P connect 159 0 23 0;
> #P connect 27 0 159 0;
> #P connect 20 0 27 0;
> #P connect 165 0 164 0;
> #P connect 166 0 164 0;
> #P hidden connect 106 1 161 0;
> #P window clipboard copycount 209;
>
>


November 14, 2007 | 10:31 pm

I figured it out literally a minute after I posted. Rather than connecting the if/thens to a toggle box, I connected them directly to the LED boxes. Works like a charm. Thanks though.

~nick


Viewing 3 posts - 1 through 3 (of 3 total)