Introduction: Animated Halloween Evil Eyes

Picture of Animated Halloween Evil Eyes

This Instructable details how to create animated Halloween blinking 'Evil Eyes' using an Arduino Uno and two 8by8 Red LED matrices with MAXIM MAX7219 driver chips.

The design is such that an animation can be quickly and simply created using Microsoft Excel to graphically develop each animated frame, auto generate 'C' code, 'drop' this into a framework sketch (EvilEyes2.ino) and download to the target platform to view the live animation results in seconds. Once satisfied the animation is just right, many animations can be combined to execute asynchronously in a separate framework sketch (EvilEyesN.ino). At the time of writing, the software was tested using three pairs of 'Evil Eyes' as in the image above.

It requires no tools, minimal knowledge of electronics and the following parts/libraries;

1. 5 off prototyping wires with male/female connectors (in the picture above, Red, Black, Blue, Green and Yellow)

2. 2*n off (for each pair of eyes) MAX7219 Red Dot Matrix LED Display Module Boards with cables

3. 1 off Arduino Uno

4. The Arduino LedControl library in Git Hub.

Step 1: MAX7219 Red Dot Matrix LED Display Module Boards With Cables

Picture of MAX7219 Red Dot Matrix LED Display Module Boards With Cables

The image above shows the LED Matrix displays which were purchased from Amazon in the UK for an unbelievable £1.99 and shipped from China FOC.

Step 2: Interconnections

Picture of Interconnections

The parts are connected as shown above, 'daisy chained' from left to right in groups of two. In the software position 1 is on the left, moving right incrementally. for more 'Evil Eyes', all you need to do is repeat the pattern with the Blue, Violet, Grey, White and Black wires. Given each LED Matrix comes with a 5 way female/female cable this is simple to achieve.

Note 1 : Remember the Arduino feeds the bottom of the LED matrix and top of the LED matrix feeds the bottom of the next LED matrix and so on etc. This is because 'Din' is on the bottom and 'Dout' on the top. 'Dout' feeds 'Din'. Follow this pattern and you can't go wrong.

Note 2 : The visually astute of you will notice in the diagram the 8x8 display shows a six way connector. The ones used in this Instructable are indeed 5 way. Why you may ask? This is all I could find in Fritzing. I know I am going to take some flack from Fritzing fans, but I really lost the will to live trying to wrestle with the software to create my own part and gave up in the end. Rant over. :-)

Step 3: Creating the Animation

The video above gives a 'very' brief overview of how to create the animation.

The steps are as follows;

1. Using the Spread sheet in the attached file below 'Eyes5.xlsm'. (Yes, revision 5. It took 5 goes of using it 'in anger' to get the spread sheet and code generation working optimally. The secret is the connection between frame title and corresponding #define. It makes putting together a series of frames easier and quicker).

2. Click on the 'Source' Worksheet. For every pair of 'Eyes' colour the given pixcel RED if you desire the corresponding LED in the 8x8 LED matrix to be illuminated for this animation frame. (In the video you can see me putting the pupil into the right eye of the first frame. Apologies there is no mouse visible it was my first go at using Microsoft Expression Encoder 4)

3. Once complete, move to the 'Details' work sheet and fill out how many animations you would like to encode. Then press the 'Generate Code' button.

4. After generation is complete the spread sheet flicks to the 'Code' worksheet. Just press Ctrl-A to select all, then Ctrl-C to copy all code to the clipboard.

5. Activate the Arduino IDE. I am assuming you have already opened EvilEyes2.ino. Then paste over the top of the existing code. Ctrl-V. As in the video.

6. Create your animation by stringing together many frames into a 'movie' (you only need to use the left eye as reference, the framework automatically picks the next entry in the array for the right eye), choosing how long you want to display the frame for and how bright you want it to be displayed on the 8x8 Matrix.

7. Compile, download and run.

8. Repeat steps 6 and 7 until you are happy with your 'movie'.

Full instructions are in the spread sheet on the worksheet marked 'Details'.

Note : For the auto code generation to work, the spread sheet will need macros turned on. If you are worried about the VBA, keep macros off, open the spread sheet and press Alt-F11. The VBA editor will open and you can satisfy yourself there is nothing untoward in the code.

Step 4: Viewing Your Handywork

The video above shows a typical animation of the Halloween 'Evil Eyes'

Step 5: Putting Together the Movie

A movie is just a sequence of animated frames;

The sequence of frames is held in an array of 'frames' ('frameType' in the sketch) or 'movie' ('frameType movie[]' in the sketch).

Each 'frameType' has three parameters;

int frameCount; // A pointer to the array holding the animations you've just designed.

int frameDelay; // A delay value in MilliSeconds indicating how long to display this given frame.

int frameLuminance; // a value 0...15 indicating how bright to display this frame.

So a movie is a collection of frames;

frameType movie[] =


// Blink

{LeftEye2,6000,1}, {LeftEye2,5,1}, {LeftEye3,10,1}, {LeftEye4,10,1}, {LeftEye3,10,1}, {LeftEye2,5,1}


Step 6: Your Very Own Multiplex Cinema!

Once you have created your animations you can string them together and use one Arduino to drive many pairs of 'Evil Eyes'

Using the sketch below 'EvilEyesN.ino' you can enter more than one movie, connect up your daisy chained 8x8 matrices and see them run.

I have included an example video of just this above (sorry it also contains the editing process).

Step 7: Why Stop There!

You don't have to stop at animations of eyes.

The video above shows animations of three waveforms.

It only takes a few minutes to create the animations and see them run.

Have fun.

Further update. 04/10/15

Please note if you are using Arduino IDE > 1.0.6, you will need to make a change to the following type def.

Change 'prog_uchar' for 'const unsigned char'.

In file EvilEyes2.ino, this is at line 69 and file EvilEyesN.ino this is at line 103.

Thanks to Sacchetta for bringing this compilation problem to light.


GaryY21 (author)2017-12-03

Thank you ! There are lots of programs open source on the internet, the trick is getting one that compiles without errors on the first try and works. This is it ! Its an excellent starting place for people to gain confidence in the MAX7219 and have fun programming. I have put the LED matrices into a Halloween gas mask, strapped to a teddy Bear to demo for kids STEM event, without modification. Hilarious ! This program is a great teaching tool. I cant wait to expand the movie for other projects.

SteveQuinn (author)GaryY212017-12-04

Hi GaryY21,

You're very welcome. I'm glad you have found it useful, especially for STEM. The world needs more savvy engineers.

In true Instructables tradition why not post an 'I've made it' photo.

Best Regards


GaryY21 (author)SteveQuinn2017-12-09

Savvy or sub-savvy, engineers make the world go round :-) , here is a video of the animation test stand. Have more parts on order to install into its final destination. Thanks again

SteveQuinn (author)GaryY212017-12-10

Hi GaryY21,

Great YT Video.

I have to say, that's an outstanding application of the Instructable. Shows great creativity. Far more than me.

Best Regards


GaryY21 made it! (author)SteveQuinn2017-12-27

Thanks for the coaching, another update to share

Chillout (author)2016-09-01

Great instructable! My Arduino was gathering some dust, I'm going to use this instructable to make it useful again by integrating this into my Daft Punk helmet!

SteveQuinn (author)Chillout2016-09-02

Hi Chillout,

Glad it will be of some use.
Don't forget to send a picture.



Chillout (author)SteveQuinn2016-09-06

I will for sure! :-)
I'm not a good coder, but I'm going to try to add user input over serial interface to it, like in this instructable. I think it should work if I create multiple movie arrays, and depending of the command in the serial console, a different for loop kicks off with the movie that goes with it. That would make the helmet a bit more dynamic.

SteveQuinn (author)Chillout2016-09-07

I liked Igor's Instructable.

There are a couple of points you should bear in mind if you want to add some form of serial control;

1. Put any serial port testing code in the while(true) loop at the bottom of the sketch.

2. Use the highest baud rate you can

3. Try keep the number of serial port char testing to a minimum. The code was designed to free run, testing for received serial port input may make the animation become jerky.

4. The code I wrote was optimised for a display pair. ie. two displays, primarily to simulate eyes.

andy_dc2000 (author)2016-06-05

I made this. Can't wait for Halloween.

SteveQuinn (author)andy_dc20002016-07-22

Well done, that'll frighten 'em. ;-)

andy_dc2000 (author)2016-05-31

nice. i made it!

SteveQuinn (author)andy_dc20002016-06-01

Well done. Do you have a pic?

daphur (author)2015-02-06

When I upload the code I get "LedControl' does not name a type" error... deleted code and it didn't fix. reuploaded still nothing...

SteveQuinn (author)daphur2015-02-06

Sounds like you have an issue with your install.

I am using the following;

Arduino Dev Env 1.5.5

Ledcontrol-1.0.1, Copyright (c) 2007 Eberhard Fahle

The manual for which is here;

I am using a Windows 7 PC

See here for how to install an Arduino Library (just in case).

TobyW5 (author)SteveQuinn2015-11-03

Hi i have had the same problem but with a bit of research iv found "Replace prog_char with const char..." fixed it for me thanks Steve great project

(ref :

sacchetta made it! (author)2015-10-05

Thanks Steve!!

SteveQuinn (author)sacchetta2015-10-06


sacchetta (author)2015-10-04

It worked!! Thanks Steve, you are the man!

wenden_jason (author)2015-06-10

Evil eyes ?
More like arguing logos

goldenshuttle (author)2015-02-17

Your project is fascinating. It can be a concept for more idea's. Like this collapsing segments digital clock ? I think if we have some sharp code writer, he/she can create a code for it, using your matrix...see below

dissertationindia (author)2015-01-18

Wow! This is really very interesting.


抹茶-红豆 (author)2015-01-18

It is a nice idea.I like it(^0^)/

SteveQuinn (author)抹茶-红豆2015-02-01


jsullivan27 (author)2015-01-19

well done. easy to follow and quick fun.

SteveQuinn (author)jsullivan272015-02-01


cyrille769 (author)2015-01-25

great !!

i was just doing nothing with those parts ( led matrix )

now with your .xls and code it's all about fun

Thank you a lot !

SteveQuinn (author)cyrille7692015-02-01

Glad I could be of some help. :-)

paulindallas (author)2015-01-18

Very nice first Instructable. Lot of good info and well presented. Going to have to give it more study to maybe "borrow" a few ideas. ;-) Hope to see more of you projects here in the future.

SteveQuinn (author)paulindallas2015-02-01

You are welcome to help yourself to the code etc.

Glad you liked it.

Sasando_Rote (author)2015-01-18


About This Instructable




More by SteveQuinn:IR Remote Control Via IoT. Part  10 IoT, Home AutomationI2C InfraRed Remote Control With the ArduinoIoT Mains Controller. Part 9 : IoT, Home Automation
Add instructable to: