Components and supplies
Solderless Breadboard Full Size
USB-A to Micro-USB Cable
Arduino UNO
10 LEDs Bar Array, Green
Wire, Hook Up
Resistor 220 ohm
Apps and platforms
Arduino IDE
Project description
Code
LED Array hypnotizer
c_cpp
1void setup() { 2 // put your setup code here, to run once: 3 pinMode(2, OUTPUT); 4 pinMode(3, OUTPUT); 5 pinMode(4, OUTPUT); 6 pinMode(5, OUTPUT); 7 pinMode(6, OUTPUT); 8 pinMode(7, OUTPUT); 9 pinMode(8, OUTPUT); 10 pinMode(9, OUTPUT); 11 pinMode(10, OUTPUT); 12 pinMode(11, OUTPUT); 13} 14int frame1[] {1,1,1,1,1,1,1,1,1,1}; 15int frame2[] {0,1,1,1,1,1,1,1,1,0}; 16int frame3[] {0,0,1,1,1,1,1,1,0,0}; 17int frame4[] {0,0,0,1,1,1,1,0,0,0}; 18int frame5[] {0,0,0,0,1,1,0,0,0,0}; 19int frame6[] {0,0,0,0,0,0,0,0,0,0}; 20int frame7[] {1,0,0,0,0,0,0,0,0,1}; 21int frame8[] {1,1,0,0,0,0,0,0,1,1}; 22int frame9[] {1,1,1,0,0,0,0,1,1,1}; 23int frame10[] {1,1,1,1,0,0,1,1,1,1}; 24int frame11[] {1,1,1,1,1,1,1,1,1,1}; 25int frame12[] {0,0,0,0,0,0,0,0,0,0}; 26int frame13[] {1,0,0,0,0,0,0,0,0,1}; 27int frame14[] {1,0,0,0,1,1,0,0,0,1}; 28int frame15[] {1,0,1,0,1,1,0,1,0,1}; 29int frame16[] {1,1,1,0,1,1,0,1,1,1}; 30int frame17[] {1,1,1,1,1,1,1,1,1,1}; 31int frame18[] {0,0,0,0,0,0,0,0,0,0}; 32int frame19[] {1,0,0,0,0,0,0,0,0,0}; 33int frame20[] {1,1,0,0,0,0,0,0,0,0}; 34int frame21[] {1,1,1,0,0,0,0,0,0,0}; 35int frame22[] {1,1,1,1,0,0,0,0,0,0}; 36int frame23[] {1,1,1,1,1,0,0,0,0,0}; 37int frame24[] {1,1,1,1,1,1,0,0,0,0}; 38int frame25[] {1,1,1,1,1,1,1,0,0,0}; 39int frame26[] {1,1,1,1,1,1,1,1,0,0}; 40int frame27[] {1,1,1,1,1,1,1,1,1,0}; 41int frame28[] {1,1,1,1,1,1,1,1,1,1}; 42int frame29[] {0,1,1,1,1,1,1,1,1,1}; 43int frame30[] {0,0,1,1,1,1,1,1,1,1}; 44int frame31[] {0,0,0,1,1,1,1,1,1,1}; 45int frame32[] {0,0,0,0,1,1,1,1,1,1}; 46int frame33[] {0,0,0,0,0,1,1,1,1,1}; 47int frame34[] {0,0,0,0,0,0,1,1,1,1}; 48int frame35[] {0,0,0,0,0,0,0,1,1,1}; 49int frame36[] {0,0,0,0,0,0,0,0,1,1}; 50int frame37[] {0,0,0,0,0,0,0,0,0,1}; 51int frame38[] {0,0,0,0,0,0,0,0,0,0}; 52int frame39[] {1,0,0,0,0,0,0,0,0,0}; 53int frame40[] {0,0,0,0,0,0,0,0,0,1}; 54int frame41[] {1,0,0,0,0,0,0,0,0,1}; 55int frame42[] {0,0,0,0,0,0,0,0,1,1}; 56int frame43[] {1,0,0,0,0,0,0,0,1,1}; 57int frame44[] {0,0,0,0,0,0,0,1,1,1}; 58int frame45[] {1,0,0,0,0,0,0,1,1,1}; 59int frame46[] {0,0,0,0,0,0,1,1,1,1}; 60int frame47[] {1,0,0,0,0,0,1,1,1,1}; 61int frame48[] {0,0,0,0,0,1,1,1,1,1}; 62int frame49[] {1,0,0,0,0,1,1,1,1,1}; 63int frame50[] {0,0,0,0,1,1,1,1,1,1}; 64int frame51[] {1,0,0,0,1,1,1,1,1,1}; 65int frame52[] {0,0,0,1,1,1,1,1,1,1}; 66int frame53[] {1,0,0,1,1,1,1,1,1,1}; 67int frame54[] {0,0,1,1,1,1,1,1,1,1}; 68int frame55[] {1,0,1,1,1,1,1,1,1,1}; 69int frame56[] {0,1,1,1,1,1,1,1,1,1}; 70int frame57[] {1,1,1,1,1,1,1,1,1,1}; 71int frame58[] {0,0,0,0,0,0,0,0,0,0}; 72int frame59[] {0,1,0,1,0,1,0,1,0,1}; 73int frame60[] {0,0,0,0,0,0,0,0,0,0}; 74int frame61[] {1,0,1,0,1,0,1,0,1,0}; 75int frame62[] {0,0,0,0,0,0,0,0,0,0}; 76int frame63[] {1,0,0,0,0,0,0,0,0,0}; 77int frame64[] {0,1,0,0,0,0,0,0,0,0}; 78int frame65[] {1,0,1,0,0,0,0,0,0,0}; 79int frame66[] {0,1,0,1,0,0,0,0,0,0}; 80int frame67[] {1,0,1,0,1,0,0,0,0,0}; 81int frame68[] {0,1,0,1,0,1,0,0,0,0}; 82int frame69[] {1,0,1,0,1,0,1,0,0,0}; 83int frame70[] {0,1,0,1,0,1,0,1,0,0}; 84int frame71[] {1,0,1,0,1,0,1,0,1,0}; 85int frame72[] {0,1,0,1,0,1,0,1,0,1}; 86int frame73[] {0,0,0,0,0,0,0,0,0,0}; 87 88 89int frames = 72; 90int frame = 0; 91int speed = 250; 92 93void loop() { 94 // put your main code here, to run repeatedly: 95 frame++; 96 97 if (frame == frames) { 98 frame=1; 99 } 100 101 if (frame == 1) { 102 for (int LED = 0; LED < 10; LED++) { 103 if (frame1[LED] == 1) { 104 digitalWrite(LED+2, HIGH); 105 } else { 106 digitalWrite(LED+2, LOW); 107 } 108 } 109 } 110 111 if (frame == 2) { 112 for (int LED = 0; LED < 10; LED++) { 113 if (frame2[LED] == 1) { 114 digitalWrite(LED+2, HIGH); 115 } else { 116 digitalWrite(LED+2, LOW); 117 } 118 } 119 } 120 121 if (frame == 3) { 122 for (int LED = 0; LED < 10; LED++) { 123 if (frame3[LED] == 1) { 124 digitalWrite(LED+2, HIGH); 125 } else { 126 digitalWrite(LED+2, LOW); 127 } 128 } 129 } 130 131 if (frame == 4) { 132 for (int LED = 0; LED < 10; LED++) { 133 if (frame4[LED] == 1) { 134 digitalWrite(LED+2, HIGH); 135 } else { 136 digitalWrite(LED+2, LOW); 137 } 138 } 139 } 140 141 if (frame == 5) { 142 for (int LED = 0; LED < 10; LED++) { 143 if (frame5[LED] == 1) { 144 digitalWrite(LED+2, HIGH); 145 } else { 146 digitalWrite(LED+2, LOW); 147 } 148 } 149 } 150 151 if (frame == 6) { 152 for (int LED = 0; LED < 10; LED++) { 153 if (frame6[LED] == 1) { 154 digitalWrite(LED+2, HIGH); 155 } else { 156 digitalWrite(LED+2, LOW); 157 } 158 } 159 } 160 161 if (frame == 7) { 162 for (int LED = 0; LED < 10; LED++) { 163 if (frame7[LED] == 1) { 164 digitalWrite(LED+2, HIGH); 165 } else { 166 digitalWrite(LED+2, LOW); 167 } 168 } 169 } 170 171 if (frame == 8) { 172 for (int LED = 0; LED < 10; LED++) { 173 if (frame8[LED] == 1) { 174 digitalWrite(LED+2, HIGH); 175 } else { 176 digitalWrite(LED+2, LOW); 177 } 178 } 179 } 180 181 if (frame == 9) { 182 for (int LED = 0; LED < 10; LED++) { 183 if (frame9[LED] == 1) { 184 digitalWrite(LED+2, HIGH); 185 } else { 186 digitalWrite(LED+2, LOW); 187 } 188 } 189 } 190 191 if (frame == 10) { 192 for (int LED = 0; LED < 10; LED++) { 193 if (frame10[LED] == 1) { 194 digitalWrite(LED+2, HIGH); 195 } else { 196 digitalWrite(LED+2, LOW); 197 } 198 } 199 } 200 201 if (frame == 11) { 202 for (int LED = 0; LED < 10; LED++) { 203 if (frame11[LED] == 1) { 204 digitalWrite(LED+2, HIGH); 205 } else { 206 digitalWrite(LED+2, LOW); 207 } 208 } 209 } 210 211 if (frame == 12) { 212 for (int LED = 0; LED < 10; LED++) { 213 if (frame12[LED] == 1) { 214 digitalWrite(LED+2, HIGH); 215 } else { 216 digitalWrite(LED+2, LOW); 217 } 218 } 219 } 220 221 if (frame == 13) { 222 for (int LED = 0; LED < 10; LED++) { 223 if (frame13[LED] == 1) { 224 digitalWrite(LED+2, HIGH); 225 } else { 226 digitalWrite(LED+2, LOW); 227 } 228 } 229 } 230 231 if (frame == 14) { 232 for (int LED = 0; LED < 10; LED++) { 233 if (frame14[LED] == 1) { 234 digitalWrite(LED+2, HIGH); 235 } else { 236 digitalWrite(LED+2, LOW); 237 } 238 } 239 } 240 241 if (frame == 15) { 242 for (int LED = 0; LED < 10; LED++) { 243 if (frame15[LED] == 1) { 244 digitalWrite(LED+2, HIGH); 245 } else { 246 digitalWrite(LED+2, LOW); 247 } 248 } 249 } 250 251 if (frame == 16) { 252 for (int LED = 0; LED < 10; LED++) { 253 if (frame16[LED] == 1) { 254 digitalWrite(LED+2, HIGH); 255 } else { 256 digitalWrite(LED+2, LOW); 257 } 258 } 259 } 260 261 if (frame == 17) { 262 for (int LED = 0; LED < 10; LED++) { 263 if (frame17[LED] == 1) { 264 digitalWrite(LED+2, HIGH); 265 } else { 266 digitalWrite(LED+2, LOW); 267 } 268 } 269 } 270 271 if (frame == 18) { 272 for (int LED = 0; LED < 10; LED++) { 273 if (frame18[LED] == 1) { 274 digitalWrite(LED+2, HIGH); 275 } else { 276 digitalWrite(LED+2, LOW); 277 } 278 } 279 } 280 281 if (frame == 19) { 282 for (int LED = 0; LED < 10; LED++) { 283 if (frame19[LED] == 1) { 284 digitalWrite(LED+2, HIGH); 285 } else { 286 digitalWrite(LED+2, LOW); 287 } 288 } 289 } 290 291 if (frame == 20) { 292 for (int LED = 0; LED < 10; LED++) { 293 if (frame20[LED] == 1) { 294 digitalWrite(LED+2, HIGH); 295 } else { 296 digitalWrite(LED+2, LOW); 297 } 298 } 299 } 300 301 if (frame == 21) { 302 for (int LED = 0; LED < 10; LED++) { 303 if (frame21[LED] == 1) { 304 digitalWrite(LED+2, HIGH); 305 } else { 306 digitalWrite(LED+2, LOW); 307 } 308 } 309 } 310 311 if (frame == 22) { 312 for (int LED = 0; LED < 10; LED++) { 313 if (frame22[LED] == 1) { 314 digitalWrite(LED+2, HIGH); 315 } else { 316 digitalWrite(LED+2, LOW); 317 } 318 } 319 } 320 321 if (frame == 23) { 322 for (int LED = 0; LED < 10; LED++) { 323 if (frame23[LED] == 1) { 324 digitalWrite(LED+2, HIGH); 325 } else { 326 digitalWrite(LED+2, LOW); 327 } 328 } 329 } 330 331 if (frame == 24) { 332 for (int LED = 0; LED < 10; LED++) { 333 if (frame24[LED] == 1) { 334 digitalWrite(LED+2, HIGH); 335 } else { 336 digitalWrite(LED+2, LOW); 337 } 338 } 339 } 340 341 if (frame == 25) { 342 for (int LED = 0; LED < 10; LED++) { 343 if (frame25[LED] == 1) { 344 digitalWrite(LED+2, HIGH); 345 } else { 346 digitalWrite(LED+2, LOW); 347 } 348 } 349 } 350 351 if (frame == 26) { 352 for (int LED = 0; LED < 10; LED++) { 353 if (frame26[LED] == 1) { 354 digitalWrite(LED+2, HIGH); 355 } else { 356 digitalWrite(LED+2, LOW); 357 } 358 } 359 } 360 361 if (frame == 27) { 362 for (int LED = 0; LED < 10; LED++) { 363 if (frame27[LED] == 1) { 364 digitalWrite(LED+2, HIGH); 365 } else { 366 digitalWrite(LED+2, LOW); 367 } 368 } 369 } 370 371 if (frame == 28) { 372 for (int LED = 0; LED < 10; LED++) { 373 if (frame28[LED] == 1) { 374 digitalWrite(LED+2, HIGH); 375 } else { 376 digitalWrite(LED+2, LOW); 377 } 378 } 379 } 380 381 if (frame == 29) { 382 for (int LED = 0; LED < 10; LED++) { 383 if (frame29[LED] == 1) { 384 digitalWrite(LED+2, HIGH); 385 } else { 386 digitalWrite(LED+2, LOW); 387 } 388 } 389 } 390 391 if (frame == 30) { 392 for (int LED = 0; LED < 10; LED++) { 393 if (frame30[LED] == 1) { 394 digitalWrite(LED+2, HIGH); 395 } else { 396 digitalWrite(LED+2, LOW); 397 } 398 } 399 } 400 401 if (frame == 31) { 402 for (int LED = 0; LED < 10; LED++) { 403 if (frame31[LED] == 1) { 404 digitalWrite(LED+2, HIGH); 405 } else { 406 digitalWrite(LED+2, LOW); 407 } 408 } 409 } 410 411 if (frame == 32) { 412 for (int LED = 0; LED < 10; LED++) { 413 if (frame32[LED] == 1) { 414 digitalWrite(LED+2, HIGH); 415 } else { 416 digitalWrite(LED+2, LOW); 417 } 418 } 419 } 420 421 if (frame == 33) { 422 for (int LED = 0; LED < 10; LED++) { 423 if (frame33[LED] == 1) { 424 digitalWrite(LED+2, HIGH); 425 } else { 426 digitalWrite(LED+2, LOW); 427 } 428 } 429 } 430 if (frame == 34) { 431 for (int LED = 0; LED < 10; LED++) { 432 if (frame34[LED] == 1) { 433 digitalWrite(LED+2, HIGH); 434 } else { 435 digitalWrite(LED+2, LOW); 436 } 437 } 438 } 439 440 if (frame == 35) { 441 for (int LED = 0; LED < 10; LED++) { 442 if (frame35[LED] == 1) { 443 digitalWrite(LED+2, HIGH); 444 } else { 445 digitalWrite(LED+2, LOW); 446 } 447 } 448 } 449 450 if (frame == 36) { 451 for (int LED = 0; LED < 10; LED++) { 452 if (frame36[LED] == 1) { 453 digitalWrite(LED+2, HIGH); 454 } else { 455 digitalWrite(LED+2, LOW); 456 } 457 } 458 } 459 460 if (frame == 37) { 461 for (int LED = 0; LED < 10; LED++) { 462 if (frame37[LED] == 1) { 463 digitalWrite(LED+2, HIGH); 464 } else { 465 digitalWrite(LED+2, LOW); 466 } 467 } 468 } 469 470 if (frame == 38) { 471 for (int LED = 0; LED < 10; LED++) { 472 if (frame38[LED] == 1) { 473 digitalWrite(LED+2, HIGH); 474 } else { 475 digitalWrite(LED+2, LOW); 476 } 477 } 478 } 479 480 if (frame == 39) { 481 for (int LED = 0; LED < 10; LED++) { 482 if (frame39[LED] == 1) { 483 digitalWrite(LED+2, HIGH); 484 } else { 485 digitalWrite(LED+2, LOW); 486 } 487 } 488 } 489 490 if (frame == 40) { 491 for (int LED = 0; LED < 10; LED++) { 492 if (frame40[LED] == 1) { 493 digitalWrite(LED+2, HIGH); 494 } else { 495 digitalWrite(LED+2, LOW); 496 } 497 } 498 } 499 500 if (frame == 41) { 501 for (int LED = 0; LED < 10; LED++) { 502 if (frame41[LED] == 1) { 503 digitalWrite(LED+2, HIGH); 504 } else { 505 digitalWrite(LED+2, LOW); 506 } 507 } 508 } 509 510 if (frame == 42) { 511 for (int LED = 0; LED < 10; LED++) { 512 if (frame42[LED] == 1) { 513 digitalWrite(LED+2, HIGH); 514 } else { 515 digitalWrite(LED+2, LOW); 516 } 517 } 518 } 519 520 if (frame == 43) { 521 for (int LED = 0; LED < 10; LED++) { 522 if (frame43[LED] == 1) { 523 digitalWrite(LED+2, HIGH); 524 } else { 525 digitalWrite(LED+2, LOW); 526 } 527 } 528 } 529 if (frame == 44) { 530 for (int LED = 0; LED < 10; LED++) { 531 if (frame44[LED] == 1) { 532 digitalWrite(LED+2, HIGH); 533 } else { 534 digitalWrite(LED+2, LOW); 535 } 536 } 537 } 538 539 if (frame == 45) { 540 for (int LED = 0; LED < 10; LED++) { 541 if (frame45[LED] == 1) { 542 digitalWrite(LED+2, HIGH); 543 } else { 544 digitalWrite(LED+2, LOW); 545 } 546 } 547 } 548 549 if (frame == 46) { 550 for (int LED = 0; LED < 10; LED++) { 551 if (frame46[LED] == 1) { 552 digitalWrite(LED+2, HIGH); 553 } else { 554 digitalWrite(LED+2, LOW); 555 } 556 } 557 } 558 559 if (frame == 47) { 560 for (int LED = 0; LED < 10; LED++) { 561 if (frame47[LED] == 1) { 562 digitalWrite(LED+2, HIGH); 563 } else { 564 digitalWrite(LED+2, LOW); 565 } 566 } 567 } 568 569 if (frame == 48) { 570 for (int LED = 0; LED < 10; LED++) { 571 if (frame48[LED] == 1) { 572 digitalWrite(LED+2, HIGH); 573 } else { 574 digitalWrite(LED+2, LOW); 575 } 576 } 577 } 578 579 if (frame == 49) { 580 for (int LED = 0; LED < 10; LED++) { 581 if (frame49[LED] == 1) { 582 digitalWrite(LED+2, HIGH); 583 } else { 584 digitalWrite(LED+2, LOW); 585 } 586 } 587 } 588 if (frame == 50) { 589 for (int LED = 0; LED < 10; LED++) { 590 if (frame50[LED] == 1) { 591 digitalWrite(LED+2, HIGH); 592 } else { 593 digitalWrite(LED+2, LOW); 594 } 595 } 596 } 597 598 if (frame == 51) { 599 for (int LED = 0; LED < 10; LED++) { 600 if (frame51[LED] == 1) { 601 digitalWrite(LED+2, HIGH); 602 } else { 603 digitalWrite(LED+2, LOW); 604 } 605 } 606 } 607 608 if (frame == 52) { 609 for (int LED = 0; LED < 10; LED++) { 610 if (frame52[LED] == 1) { 611 digitalWrite(LED+2, HIGH); 612 } else { 613 digitalWrite(LED+2, LOW); 614 } 615 } 616 } 617 618 if (frame == 53) { 619 for (int LED = 0; LED < 10; LED++) { 620 if (frame53[LED] == 1) { 621 digitalWrite(LED+2, HIGH); 622 } else { 623 digitalWrite(LED+2, LOW); 624 } 625 } 626 } 627 628 if (frame == 54) { 629 for (int LED = 0; LED < 10; LED++) { 630 if (frame54[LED] == 1) { 631 digitalWrite(LED+2, HIGH); 632 } else { 633 digitalWrite(LED+2, LOW); 634 } 635 } 636 } 637 638 if (frame == 55) { 639 for (int LED = 0; LED < 10; LED++) { 640 if (frame55[LED] == 1) { 641 digitalWrite(LED+2, HIGH); 642 } else { 643 digitalWrite(LED+2, LOW); 644 } 645 } 646 } 647 648 if (frame == 56) { 649 for (int LED = 0; LED < 10; LED++) { 650 if (frame56[LED] == 1) { 651 digitalWrite(LED+2, HIGH); 652 } else { 653 digitalWrite(LED+2, LOW); 654 } 655 } 656 } 657 658 if (frame == 57) { 659 for (int LED = 0; LED < 10; LED++) { 660 if (frame57[LED] == 1) { 661 digitalWrite(LED+2, HIGH); 662 } else { 663 digitalWrite(LED+2, LOW); 664 } 665 } 666 } 667 668 if (frame == 58) { 669 for (int LED = 0; LED < 10; LED++) { 670 if (frame58[LED] == 1) { 671 digitalWrite(LED+2, HIGH); 672 } else { 673 digitalWrite(LED+2, LOW); 674 } 675 } 676 } 677 678 if (frame == 59) { 679 for (int LED = 0; LED < 10; LED++) { 680 if (frame59[LED] == 1) { 681 digitalWrite(LED+2, HIGH); 682 } else { 683 digitalWrite(LED+2, LOW); 684 } 685 } 686 } 687 688 if (frame == 60) { 689 for (int LED = 0; LED < 10; LED++) { 690 if (frame60[LED] == 1) { 691 digitalWrite(LED+2, HIGH); 692 } else { 693 digitalWrite(LED+2, LOW); 694 } 695 } 696 } 697 698 if (frame == 61) { 699 for (int LED = 0; LED < 10; LED++) { 700 if (frame61[LED] == 1) { 701 digitalWrite(LED+2, HIGH); 702 } else { 703 digitalWrite(LED+2, LOW); 704 } 705 } 706 } 707 708 if (frame == 62) { 709 for (int LED = 0; LED < 10; LED++) { 710 if (frame62[LED] == 1) { 711 digitalWrite(LED+2, HIGH); 712 } else { 713 digitalWrite(LED+2, LOW); 714 } 715 } 716 } 717 718 if (frame == 63) { 719 for (int LED = 0; LED < 10; LED++) { 720 if (frame63[LED] == 1) { 721 digitalWrite(LED+2, HIGH); 722 } else { 723 digitalWrite(LED+2, LOW); 724 } 725 } 726 } 727 728 if (frame == 64) { 729 for (int LED = 0; LED < 10; LED++) { 730 if (frame64[LED] == 1) { 731 digitalWrite(LED+2, HIGH); 732 } else { 733 digitalWrite(LED+2, LOW); 734 } 735 } 736 } 737 738 if (frame == 65) { 739 for (int LED = 0; LED < 10; LED++) { 740 if (frame65[LED] == 1) { 741 digitalWrite(LED+2, HIGH); 742 } else { 743 digitalWrite(LED+2, LOW); 744 } 745 } 746 } 747 748 if (frame == 66) { 749 for (int LED = 0; LED < 10; LED++) { 750 if (frame66[LED] == 1) { 751 digitalWrite(LED+2, HIGH); 752 } else { 753 digitalWrite(LED+2, LOW); 754 } 755 } 756 } 757 758 if (frame == 67) { 759 for (int LED = 0; LED < 10; LED++) { 760 if (frame67[LED] == 1) { 761 digitalWrite(LED+2, HIGH); 762 } else { 763 digitalWrite(LED+2, LOW); 764 } 765 } 766 } 767 768 if (frame == 68) { 769 for (int LED = 0; LED < 10; LED++) { 770 if (frame68[LED] == 1) { 771 digitalWrite(LED+2, HIGH); 772 } else { 773 digitalWrite(LED+2, LOW); 774 } 775 } 776 } 777 778 if (frame == 69) { 779 for (int LED = 0; LED < 10; LED++) { 780 if (frame69[LED] == 1) { 781 digitalWrite(LED+2, HIGH); 782 } else { 783 digitalWrite(LED+2, LOW); 784 } 785 } 786 } 787 788 if (frame == 70) { 789 for (int LED = 0; LED < 10; LED++) { 790 if (frame70[LED] == 1) { 791 digitalWrite(LED+2, HIGH); 792 } else { 793 digitalWrite(LED+2, LOW); 794 } 795 } 796 } 797 798 if (frame == 71) { 799 for (int LED = 0; LED < 10; LED++) { 800 if (frame71[LED] == 1) { 801 digitalWrite(LED+2, HIGH); 802 } else { 803 digitalWrite(LED+2, LOW); 804 } 805 } 806 } 807 808 if (frame == 72) { 809 for (int LED = 0; LED < 10; LED++) { 810 if (frame72[LED] == 1) { 811 digitalWrite(LED+2, HIGH); 812 } else { 813 digitalWrite(LED+2, LOW); 814 } 815 } 816 } 817 if (frame == 73) { 818 for (int LED = 0; LED < 10; LED++) { 819 if (frame73[LED] == 1) { 820 digitalWrite(LED+2, HIGH); 821 } else { 822 digitalWrite(LED+2, LOW); 823 } 824 } 825 } 826 827 delay(speed); 828}
Downloadable files
LED Array hypnotizer
This is the code. You simply upload it :)
LED Array hypnotizer
LED Array hypnotizer
This is the code. You simply upload it :)
LED Array hypnotizer
Comments
Only logged in users can leave comments