Create a Smiley Face Using LED Matrix With Arduino Nano
by subairui73 in Circuits > Arduino
59 Views, 0 Favorites, 0 Comments
Create a Smiley Face Using LED Matrix With Arduino Nano
This instructable will demonstrate the basic steps to display a smiley face using LED Matrix with Arduino Nano. Consider this a simplified version of Intractable: LED Matrix with Arduino, featuring an interesting demo without detailed explanations.
Download Library
First, download the "LedControl" library by Eberhard Fahle.
Build Circuit
Then, build the circuit with the connections displayed in the table.
Write Code
Next, include the library:
Then, define the pins and initialize a LedControl object named lc with specified pins:
After that setup the lc object in the setup function:
Next, declare a byte array to store the face data, where each digital represents an LED in the LED matrix. Then, traverse the array and display each column by calling lc.setColumn(i, j, data):
Adapt to More Situations
Finally modify your code to adapt to more situations:
- Display the LED matrix in the loop for continuous updating
- Display the LED matrix in different orientations
- Create and display a sad face
Here’ the complete code: