NODEMCU LUA ESP8266 With 74HC595 LED and Matrix Driver




About: I like tinkering with electronics, PCs, ESP8266s and Arduinos. Would like to share what I have done as it may help others getting started or just trying something new.

This is my attempt at driving the 595 shift register with an ESP8266.

I am using NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4 on ESPlora v0.2.0-rc2, which is standard stuff. Included are 2 examples of LUA code. Both programs are the same except there is an extra line needed in the dual program. The GPIO pins on the ESP8266 are set for SPI mode.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: ESP8266 Driving Single 595 With 8 LEDS

This is how to drive a 595 from an ESP8266. I am using an ESP12 to do this, but any with more than 3 I/Os will do the job. This set up works at 3.3 volts. I am using SN74HC595N ICs, don't know if it will work with other 595s.

Included is a circuit diagram of how to connect everything together. I am assuming you know how to connect up your ESP8266 and load code into it.

This is an image of my 595 set up (also works with the Arduino).

Some simple LUA code shows the basics.

Step 2: ESP8266 Driving Dual 595s With 8 X 8 Matrix

This is my dual 595 set up with an 8x8 Matrix.

The program is exactly the same as the single except that you need to load in 16 bits of data instead of 8.

This line goes to the 2nd 595.


Change the zero to any value between 0 and 255 to see result.

Changing the zero to any value between 0 and 255 gives different lines on the matrix. You can also alter the data in the programs to display different sequences.

This line goes to the 1st 595


I have included a circuit diagram for this but there are plenty of examples for the Arduino out there. My board works with the Arduino as well as the ESP8266.

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    6 Discussions


    3 years ago

    "I have not included a circuit diagram for this as there are plenty of examples for the Arduino out there".

    No doubt you are right, but the neophyte Arduino user may not be up to pairing the circuit you created with the proper Arduino sketch or circuit information, so a few links that you believe to be appropriate may be helpful to include in your posting. ☺

    4 replies

    Reply 3 years ago

    I was new to all this once, when there was hardly anything out there and a lot of the stuff did not work either. I cannot do every instructable for all levels of readers as they would be so boring going over the simple stuff time and again. I will try and find a diagram or a link for you and others who are just learning.


    Reply 3 years ago

    Not to be argumentative with you, or to impose an additional burden, but a simple link will suffice, it will no doubt spawn other avenues of information. Yours was a rather offbeat and unusual post which is why I read it. ☺


    3 years ago

    nice one, have to try this.
    thanks and keep up the good work!