element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Best products to use for LED Matrix display for animations?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 6 replies
  • Subscribers 387 subscribers
  • Views 1553 views
  • Users 0 members are here
Related

Best products to use for LED Matrix display for animations?

pcmofo
pcmofo over 1 year ago

Hey all. I am working on making an animated Bender robot. I've built a prototype and it works well enough but I want to rethink my approach before continuing down my current path.
Early prototype (https://imgur.com/gallery/rERZgwm)
My current setup uses several microcontrollers to accomplish this. One controls the eyes/display. One plays audio files. And I planned on using a 3rd to animate the mouth

image

In an attempt to simplify my design for both the eyes and mouth I thought, what if both were LED arrays? I can worry about the exact size and custom 3D printed enclosure part later (what I have currently looks pretty good but I want to nail down the electronics better before investing any more time.
This is the general layout I was thinking of.

image

In both cases the mouth and eyes would use continuous array of LEDs These would at a minimum be single color LEDs but RGB, NeoPixel etc would all be acceptable as well. Since they are a display they would not need to be very bright individually.

Here is what I am hoping you can help me with
1. What combination of LED array types (charlie plex, multiplex, neopixel etc etc) and microcontroller processor etc would be the right fit here?
2. Does it still make sense to use multiple processors. in this case, one for each display, and most likely a 3rd to orchestrate/sync the animations between both displays and the audio, inputs etc.

Some additional info.
This is ultimately a custom clock/animated thing so cost is not a huge factor here.
I need or want it to be overly bright
Having an LED solution that works today and that I can build custom PCBs for later is a plus
Animations on the displays do not need to be crazy fast, just predictable in performance/timing and not crazy flickering.
I have the adafruit displays shown as well as a flexible neopixel array currently available to test with
I'm happy to buy a different microcontroller, currently using a M4 Express microcontroller.
Also happy to do this in Arduino or Circuit Python.

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 1 year ago +2
    It sounds like a great project. The Adafruit displays are nice. Here is an example: Epic Neopixel Birthday Cake -- Episode 583 The Arduino UNO R4 WiFi has an LED display that doesn't flicker, but…
  • dougw
    dougw over 1 year ago

    It sounds like a great project.

    The Adafruit displays are nice. Here is an example:

     Epic Neopixel Birthday Cake -- Episode 583 

    The Arduino UNO R4 WiFi has an LED display that doesn't flicker, but it may not have a suitable form factor:

     Arduino UNO R4 WiFi LED Demo 

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 1 year ago

    There is a framebuffer library in micropython https://docs.micropython.org/en/latest/library/framebuf.html I'm sure the equivalent exists in circuitpython and Arduino, might be helpful  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • robogary
    robogary over 1 year ago

    Here are a couple examples using the MAX7219  LED matrix. My starting point was based on https://www.instructables.com/Animated-Halloween-Evil-Eyes/

    https://www.youtube.com/watch?v=9YOOgCp98c8

    Some projects definitely benefit using multiple Arduinos. 

    There is a benefit to using qty 2 MAX7219 , one for each eye. The code can be the same for both eyes or can modify one eye's matrix to mirror the others for left and right.  

    I always use a separate audio card like a WTV020 or DFPlayer so the project can be done in stages. 

    https://www.youtube.com/watch?v=3ZCi0ro0LFc

    image

    image

    Here is the Arduino code from the animatronic gas mask 

    // GasMaskMatrixEyesAndSoundWorks.ino
    //www.brainy-bits.com/.../
    //
    // Pin 12 is connected to DIN, Pin 11 is connected to CS and Pin 10 is connected to CLK.
    //

    #include "LedControl.h"

    LedControl lc=LedControl(12,10,11,2); // Pins: DIN,CLK,CS, # of Display connected

    #include <Wtv020sd16p.h>

    int resetPin = 2; // The pin number of the reset pin.
    int clockPin = 3; // The pin number of the clock pin.
    int dataPin = 4; // The pin number of the data pin.
    int busyPin = 5; // The pin number of the busy pin.
    Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);

    unsigned long delayTime=200; // Delay between Frames

    // Put values in arrays
    byte invader1a[] =
    {
    B00011000, // First frame of invader #1
    B00111100,
    B01111110,
    B11011011,
    B11111111,
    B00100100,
    B01011010,
    B10100101
    };

    byte invader1b[] =
    {
    B00011000, // Second frame of invader #1
    B00111100,
    B01111110,
    B11011011,
    B11111111,
    B00100100,
    B01011010,
    B01000010
    };

    byte invader2a[] =
    {
    B00100100, // First frame of invader #2
    B00100100,
    B01111110,
    B11011011,
    B11111111,
    B11111111,
    B10100101,
    B00100100
    };

    byte invader2b[] =
    {
    B00100100, // Second frame of invader #2
    B10100101,
    B11111111,
    B11011011,
    B11111111,
    B01111110,
    B00100100,
    B01000010
    };

    byte LeftEye1[]=
    { // LeftEye1, 0
    B00111100,
    B01111110,
    B11111111,
    B11100111,
    B11100111,
    B11111111,
    B01111110,
    B00111100
    };

    byte RightEye1[]=
    { // RightEye1, 1
    B00111100,
    B01111110,
    B11111111,
    B11100111,
    B11100111,
    B11111111,
    B01111110,
    B00111100
    };

    byte LeftEye2[] =
    { // LeftEye2, 2
    B00000000,
    B00111100,
    B01111110,
    B01100110,
    B01100110,
    B01111110,
    B00111100,
    B00000000
    };

    byte RightEye2[]=
    { // RightEye2, 3
    B00000000,
    B00111100,
    B01111110,
    B01100110,
    B01100110,
    B01111110,
    B00111100,
    B00000000
    };
    byte LeftEye3[]=
    { // LeftEye3, 4
    B00000000,
    B00011000,
    B00111100,
    B00100100,
    B00100100,
    B00111100,
    B00011000,
    B00000000
    };
    byte RightEye3[] =
    { // RightEye3, 5
    B00000000,
    B00011000,
    B00111100,
    B00100100,
    B00100100,
    B00111100,
    B00011000,
    B00000000
    };
    byte LeftEye4[] =
    { // LeftEye4, 6
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000
    };
    byte RightEye4[] =
    { // RightEye4, 7
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000
    };

    byte LeftEye5[] =
    { // LeftEye5, 8
    B01111110,
    B10000001,
    B10000001,
    B10011001,
    B10011001,
    B10000001,
    B10000010,
    B01111100
    };

    byte RightEye5[]=
    { // RightEye5, 9
    B01111100,
    B10000010,
    B10000001,
    B10011001,
    B10011001,
    B10000001,
    B10000001,
    B01111110
    };

    byte LeftEye6[]=
    { // LeftEye6, 10
    B01111110,
    B10000001,
    B10000001,
    B10011001,
    B10011001,
    B10000010,
    B10000100,
    B01111000
    };

    byte RightEye6[]=
    { // RightEye6, 11
    B01111000,
    B10000100,
    B10000010,
    B10011001,
    B10011001,
    B10000001,
    B10000001,
    B01111110
    };

    byte LeftEye7[]=
    { // LeftEye7, 12
    B01111110,
    B11000001,
    B10000001,
    B10011001,
    B10011010,
    B10000100,
    B10001000,
    B01110000
    };

    byte RightEye7[]=
    { // RightEye7, 13
    B01110000,
    B10001000,
    B10000100,
    B10011010,
    B10011001,
    B10000001,
    B11000001,
    B01111110
    };

    byte LeftEye8[]=
    { // LeftEye8, 14
    B00111110,
    B01000001,
    B10000001,
    B10011001,
    B10011010,
    B10000100,
    B01001000,
    B00110000
    };
    byte RightEye8[]=
    { // RightEye8, 15
    B00110000,
    B01001000,
    B10000100,
    B10011010,
    B10011001,
    B10000001,
    B01000001,
    B00111110
    };

    byte LeftEye9[]=
    { // LeftEye9, 16
    B00111100,
    B01111110,
    B11111111,
    B11100111,
    B11100111,
    B11111111,
    B01111110,
    B00111100
    };

    byte RightEye9[]=
    { // RightEye9, 17
    B00111100,
    B01111110,
    B11111111,
    B11100111,
    B11100111,
    B11111111,
    B01111110,
    B00111100
    };

    byte LeftEye10[]=
    { // LeftEye10, 18
    B00111100,
    B01111110,
    B11111111,
    B11111111,
    B11111111,
    B11100111,
    B01100110,
    B00111100
    };

    byte RightEye10[]=
    { // RightEye10, 19
    B00111100,
    B01111110,
    B11111111,
    B11111111,
    B11111111,
    B11100111,
    B01100110,
    B00111100
    };

    byte LeftEye11[]=
    { // LeftEye11, 20
    B00111100,
    B01111110,
    B11111111,
    B11111001,
    B11111001,
    B11111111,
    B01111110,
    B00111100
    };

    byte RightEye11[]=
    { // RightEye11, 21
    B00111100,
    B01111110,
    B11111111,
    B11111001,
    B11111001,
    B11111111,
    B01111110,
    B00111100
    };

    byte LeftEye12[]=
    { // LeftEye12, 22
    B00111100,
    B01100110,
    B11100111,
    B11111111,
    B11111111,
    B11111111,
    B01111110,
    B00111100
    };

    byte RightEye12[]=
    { // RightEye12, 23
    B00111100,
    B01100110,
    B11100111,
    B11111111,
    B11111111,
    B11111111,
    B01111110,
    B00111100
    };

    byte LeftEye13[]=
    { // LeftEye13, 24
    B11000011,
    B10000001,
    B00000000,
    B00011000,
    B00011000,
    B00000000,
    B10000001,
    B11000011
    };

    byte RightEye13[]=
    { // RightEye13, 25
    B11000011,
    B10000001,
    B00000000,
    B00011000,
    B00011000,
    B00000000,
    B10000001,
    B11000011
    };

    byte LeftEye14[]=
    { // LeftEye14, 26
    B00111100,
    B01111110,
    B11111111,
    B10011111,
    B10011111,
    B11111111,
    B01111110,
    B00111100
    };

    byte RightEye14[]=
    { // RightEye14, 27
    B00111100,
    B01111110,
    B11111111,
    B10011111,
    B10011111,
    B11111111,
    B01111110,
    B00111100
    };

    byte LeftEye15[]=
    { // LeftEye15, 28
    B00000000,
    B00111100,
    B00100100,
    B00100100,
    B00100100,
    B00111100,
    B00111100,
    B00000000
    };

    byte RightEye15[]=
    { // RightEye15, 29
    B00000000,
    B00111100,
    B00100100,
    B00100100,
    B00100100,
    B00111100,
    B00111100,
    B00000000
    };

    byte LeftEye16[]=
    { // LeftEye16, 30
    B00011000,
    B00011000,
    B00011000,
    B00011000,
    B00011000,
    B00011000,
    B00011000,
    B00000000
    };

    byte RightEye16[]=
    { // RightEye16, 31
    B00000000,
    B00011000,
    B00011000,
    B00011000,
    B00011000,
    B00011000,
    B00011000,
    B00011000
    };

    byte LeftEye17[]=
    { // LeftEye17, 32
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000
    };

    byte RightEye17[]=
    { // RightEye17, 33
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000,
    B00010000
    };

    byte LeftEye18[]=
    { // LeftEye18, 34
    B00000000,
    B00000000,
    B00000000,
    B00011000,
    B00011000,
    B00000000,
    B00000000,
    B00000000
    };

    byte RightEye18[]=
    { // RightEye18, 35
    B00000000,
    B00000000,
    B00000000,
    B00011000,
    B00011000,
    B00000000,
    B00000000,
    B00000000
    };

    byte LeftEye19[]=
    { // LeftEye19, 36
    B00000000,
    B00000000,
    B00111100,
    B00100100,
    B00100100,
    B00111100,
    B00000000,
    B00000000
    };

    byte RightEye19[]=
    { // RightEye19, 37
    B00000000,
    B00000000,
    B00111100,
    B00100100,
    B00100100,
    B00111100,
    B00000000,
    B00000000
    };

    byte LeftEye20[]=
    { // LeftEye20, 38
    B00000000,
    B01111110,
    B01000010,
    B01000010,
    B01000010,
    B01000010,
    B01111110,
    B00000000
    };

    byte RightEye20[]=
    { // RightEye20, 39
    B00000000,
    B01111110,
    B01000010,
    B01000010,
    B01000010,
    B01000010,
    B01111110,
    B00000000
    };

    byte LeftEye21[]=
    { // LeftEye21, 40
    B00111110,
    B01000001,
    B10000001,
    B10011001,
    B10010010,
    B10000100,
    B01001000,
    B00110000
    };

    byte RightEye21[]=
    { // RightEye21, 41
    B00110000,
    B01001000,
    B10000100,
    B10010010,
    B10011001,
    B10000001,
    B01000001,
    B00111110
    };

    byte LeftEye22[]=
    { // LeftEye22, 42
    B11111111,
    B10000001,
    B10000001,
    B10011001,
    B10011001,
    B10000001,
    B10000001,
    B11111111
    };

    byte RightEye22[]=
    { // RightEye22, 43
    B11111111,
    B10000001,
    B10000001,
    B10011001,
    B10011001,
    B10000001,
    B10000001,
    B11111111
    };

    byte LeftEye23[]=
    { // LeftEye23, 44
    B00000000,
    B01111110,
    B01111110,
    B01100110,
    B01100110,
    B01111110,
    B01111110,
    B00000000
    };

    byte RightEye23[]=
    { // RightEye23, 45
    B00000000,
    B01111110,
    B01111110,
    B01100110,
    B01100110,
    B01111110,
    B01111110,
    B00000000
    };

    byte LeftEye24[]=
    { // LeftEye24, 46
    B01111110,
    B11111111,
    B11111111,
    B11100111,
    B11100111,
    B11111111,
    B11111110,
    B01111100
    };

    byte RightEye24[]=
    { // RightEye24, 47
    B01111100,
    B11111110,
    B11111111,
    B11100111,
    B11100111,
    B11111111,
    B11111111,
    B01111110
    };

    byte LeftEye25[]=
    { // LeftEye25, 48
    B01111110,
    B11111111,
    B11111111,
    B11100111,
    B11100111,
    B11111110,
    B11111100,
    B01111000
    };
    byte RightEye25[]=
    { // RightEye25, 49
    B01111000,
    B11111100,
    B11111110,
    B11100111,
    B11100111,
    B11111111,
    B11111111,
    B01111110
    };

    byte LeftEye26[]=
    { // LeftEye26, 50
    B01111110,
    B11111111,
    B11111111,
    B11100111,
    B11100110,
    B11111100,
    B11111000,
    B01110000
    };

    byte RightEye26[]=
    { // RightEye26, 51
    B01110000,
    B11111000,
    B11111100,
    B11100110,
    B11100111,
    B11111111,
    B11111111,
    B01111110
    };

    byte LeftEye27[]=
    { // LeftEye27, 52
    B01111110,
    B10011001,
    B10011001,
    B10000001,
    B10000001,
    B10000001,
    B10000001,
    B01111110
    };

    byte RightEye27[]=
    { // RightEye27, 53
    B01111110,
    B10011001,
    B10011001,
    B10000001,
    B10000001,
    B10000001,
    B10000001,
    B01111110
    };

    byte LeftEye28[]=
    { // LeftEye28, 54
    B01111110,
    B10011001,
    B10000001,
    B10000001,
    B10000001,
    B10000001,
    B10000001,
    B01111110
    };

    byte RightEye28[]=
    { // RightEye28, 55
    B01111110,
    B10011001,
    B10000001,
    B10000001,
    B10000001,
    B10000001,
    B10000001,
    B01111110
    };

    void setup()
    {
    // initialize the 8X8 LED matricies
    lc.shutdown(0,false); // Wake up displays
    lc.shutdown(1,false);
    lc.setIntensity(0,5); // Set intensity levels
    lc.setIntensity(1,5);
    lc.clearDisplay(0); // Clear Displays
    lc.clearDisplay(1);

    //Initializes the WTV020 module.
    wtv020sd16p.reset();

    randomSeed(analogRead(0));
    delay(1000);

    }


    void sinvader1a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,invader1a[i]);
    }
    }

    void sinvader1b()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,invader1b[i]);
    }
    }

    void LeftEye1a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    }

    void LeftEye2a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye2[i]);
    }
    }

    void LeftEye3a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye3[i]);
    }
    }

    void LeftEye4a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye4[i]);
    }
    }

    void LeftEye5a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye5[i]);
    }
    }

    void LeftEye6a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye6[i]);
    }
    }

    void LeftEye7a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye7[i]);
    }
    }

    void LeftEye8a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye8[i]);
    }
    }

    void LeftEye9a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye9[i]);
    }
    }

    void LeftEye10a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye10[i]);
    }
    }

    void LeftEye11a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye11[i]);
    }
    }

    void LeftEye12a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye12[i]);
    }
    }

    void LeftEye13a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye13[i]);
    }
    }

    void LeftEye14a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye14[i]);
    }
    }

    void LeftEye15a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye15[i]);
    }
    }

    void LeftEye16a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye16[i]);
    }
    }
    void LeftEye17a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye17[i]);
    }
    }

    void LeftEye18a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye18[i]);
    }
    }

    void LeftEye19a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye19[i]);
    }
    }

    void LeftEye20a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye20[i]);
    }
    }

    void LeftEye21a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye21[i]);
    }
    }

    void LeftEye22a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye22[i]);
    }
    }

    void LeftEye23a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye23[i]);
    }
    }

    void LeftEye24a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye24[i]);
    }
    }

    void LeftEye25a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye25[i]);
    }
    }

    void LeftEye26a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye26[i]);
    }
    }

    void LeftEye27a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye27[i]);
    }
    }

    void LeftEye28a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye28[i]);
    }
    }

    ////////////////// RIGHT SIDES ////////////////////////

    void sinvader2a()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,invader2a[i]);
    }
    }

    void sinvader2b()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,invader2b[i]);
    }
    }

    void RightEye1b()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    }


    void Blink()
    {
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(80);
    /////FRAME 2 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye2[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye2[i]);
    }
    delay(80);
    /////FRAME 3 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye3[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye3[i]);
    }
    delay(80);
    /////FRAME 4 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye4[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye4[i]);
    }
    delay(150);
    /////FRAME 5 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye3[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye3[i]);
    }
    delay(80);
    /////FRAME 6 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye2[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye2[i]);
    }
    delay(100);
    /////FRAME 7 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(80);
    }

    void FastBlink()
    {
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(30);
    /////FRAME 2 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye2[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye2[i]);
    }
    delay(30);
    /////FRAME 3 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye3[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye3[i]);
    }
    delay(30);
    /////FRAME 4 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye4[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye4[i]);
    }
    delay(60);
    /////FRAME 5 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye3[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye3[i]);
    }
    delay(30);
    /////FRAME 6 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye2[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye2[i]);
    }
    delay(30);
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(30);
    }


    void Stare()
    {
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(250);
    }

    void LookLeft()
    {
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye12[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye12[i]);
    }
    delay(500);
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(100);
    }

    void LookRight()
    {
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye10[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye10[i]);
    }
    delay(500);
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(100);
    }

    void LeftCWSpin()
    {
    ///// 12, 11,10, 14,12, 1
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye12[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye12[i]);
    }
    delay(50);
    /////FRAME 2 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye11[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye11[i]);
    }
    delay(50);
    /////FRAME 3 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye10[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye10[i]);
    }
    delay(50);
    /////FRAME 4 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye14[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye14[i]);
    }
    delay(50);
    /////FRAME 5 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye12[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye12[i]);
    }
    delay(50);
    /////FRAME 6 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(50);

    }

    void RightCCWSpin()
    {
    ///// 10,11,12,14
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye10[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye10[i]);
    }
    delay(50);
    /////FRAME 2 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye11[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye11[i]);
    }
    delay(50);
    /////FRAME 3 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye12[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye12[i]);
    }
    delay(50);
    /////FRAME 4 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye14[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye14[i]);
    }
    delay(50);
    }

    void Angry()
    {
    ///// 24,25,26
    /////FRAME 1 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye24[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye24[i]);
    }
    delay(50);
    /////FRAME 2 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye25[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye25[i]);
    }
    delay(50);
    /////FRAME 3 ////
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye26[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye26[i]);
    }
    delay(250);
    }

    void BallFlash()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye1[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye1[i]);
    }
    delay(80);
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye13[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye13[i]);
    }
    delay(80);
    }

    void SquareFlash()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye23[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye23[i]);
    }
    delay(60);
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye22[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye22[i]);
    }
    delay(60);
    }

    void Hypno()
    {
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye18[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye18[i]);
    }
    delay(75);
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye19[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye19[i]);
    }
    delay(75);
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye20[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye20[i]);
    }
    delay(75);
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(0,i,LeftEye22[i]);
    }
    for (int i = 0; i < 8; i++)
    {
    lc.setRow(1,i,RightEye22[i]);
    }

    }

    void loop()
    {
    //Plays synchronously an audio file. Busy pin is used for this method.
    FastBlink();
    delay(100);
    int x = random(15,25); //add randomness to the sound selection min # is inclusive, max # is exclusive
    delay (20);
    wtv020sd16p.playVoice(x);
    delay(50);
    x= random(1,10); //add some randomness to the routine
    for ( int i=0; i <x ; i++)
    { Stare();
    delay (1500);
    FastBlink();
    delay(200);
    Stare();
    delay(500);
    Blink();
    delay(1000);
    Stare();
    delay(1500);
    FastBlink();
    delay(200);
    FastBlink();
    delay(300);
    Blink();
    delay(1000);
    }


    x= random(1,9); //add some randomness to the routine
    for ( int i=0; i <x ; i++)
    {
    LookLeft();
    delay(1000);
    LookRight();
    delay(1000);
    }

    x= random(1,9); //add some randomness to the routine
    for ( int i=0; i <x ; i++)
    { LeftCWSpin();
    delay(50);
    }

    x= random(1,6); //add some randomness to the routine
    for ( int i=0; i <x ; i++)
    { Stare();
    delay (1000);
    FastBlink();
    delay(200);
    Stare();
    delay(500);
    }

    x= random(1,9); //add some randomness to the routine
    for ( int i=0; i <x ; i++)
    { RightCCWSpin();
    delay(50);
    }
    Stare();
    delay(2000);
    //Stops current audio file playing.
    wtv020sd16p.stopVoice();

    Angry();

    //Plays synchronously an audio file. Busy pin is used for this method.
    x= random(0,15);
    wtv020sd16p.playVoice(x);

    delay(5000);
    FastBlink();
    FastBlink();
    // check to see if a audio clip is still playing, if not, then start a new one
    int y = digitalRead(5); //read WTV020 busypin
    if (y==LOW)
    { x= random(15,25);
    wtv020sd16p.playVoice(x);}
    Angry();
    delay(5000);
    y = digitalRead(5); //read WTV020 busypin
    if (y=LOW)
    { x= random(15,25);
    wtv020sd16p.playVoice(x);}
    Stare();
    delay(1000);
    y = digitalRead(5); //read WTV020 busypin
    if (y==LOW)
    { x= random(15,25);
    wtv020sd16p.playVoice(x);}

    /////////////crazy Eyes
    x= random(1,9); //add some randomness to the routine
    for ( int i=0; i <x ; i++)
    { BallFlash();
    delay(20);
    }
    y = digitalRead(5); //read WTV020 busypin
    if (y==LOW)
    { x= random(15,25);
    wtv020sd16p.playVoice(x);}

    x= random(1,12); //add some randomness to the routine
    for ( int i=0; i <x ; i++)
    { Hypno();
    delay(20);
    }
    y = digitalRead(5); //read WTV020 busypin
    if (y==LOW)
    { x= random(15,25);
    wtv020sd16p.playVoice(x);}

    x= random(1,12); //add some randomness to the routine
    for ( int i=0; i <x ; i++)
    { SquareFlash();
    delay(15);
    }
    Stare();
    wtv020sd16p.stopVoice();
    delay(1000);
    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • pcmofo
    pcmofo over 1 year ago in reply to dougw

    Thanks! these are very helpful links

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • pcmofo
    pcmofo over 1 year ago in reply to scottiebabe

    Cool, I'll definitely check out framebuffer, thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • pcmofo
    pcmofo over 1 year ago in reply to robogary

    Awesome! thanks for sharing. It looks like we took a very similar approach to doing this. I built a "Lite bright" style iOS app that dumps the output very similar to your spreadsheet. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube