Colorful Lights ATOM Matrix ESP32

by RonFrtek in Circuits > Arduino

65 Views, 0 Favorites, 0 Comments

Colorful Lights ATOM Matrix ESP32

Colorful Lights ATOM Matrix ESP32 M5Stack

In this tutorial we are going to make a Simple Colorful Lights Project using Atom Matrix ESP32. The Colors will randomly change and if you press a button on the ATOM Matrix ESP32 the speed of colors changing will change.

Watch the Video!

What You Will Need

2022-07-27_11-05-19.jpg
VisuinoAdvrtisemenESPNowESP32C3-1.jpg


Start Visuino, and Select the Atom Matrix Board Type

Visuino-Select-Board.jpg
FSD3KJ3L66H6ORP.jpg

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Atom Matrix" as shown on Picture 2

In Visuino Add Components

2022-12-23_18-10-26.jpg
2022-12-23_18-11-50.jpg
FNCS0JGL66H6P39.jpg
2022-12-23_18-11-14.jpg
  • Add "Clock Generator" component
  • Add "Counter" component
  • Add "Clock Multi Source" component
  • Add 3X "Random Color" component


In Visuino Set Components

FW3IRY4L66H6PJA.jpg
2022-12-23_18-16-11.jpg
2022-12-23_18-19-51.jpg
2022-12-23_18-18-10.jpg
2022-12-23_18-21-55.jpg
2022-12-23_18-23-27.jpg
2022-12-23_18-25-03.jpg
2022-12-23_18-25-31.jpg
2022-12-23_18-27-12.jpg
2022-12-23_18-29-14.jpg
2022-12-23_18-30-26.jpg
  • Select "M5 Stack ATOM Matrix" board in the properties window expand "Modules">"RGB Matrix">"Elements" and click on the 3 dots button

  • In the "Elements" window drag "Draw Rectangle" to the left side and in the properties window set "Color" to "aclYellow" & click on the Pin Icon and select "Alpha Color SinkPin" and set "Height" to 5 and "Width" to 5
  • In the "Elements" window drag another "Draw Rectangle" to the left side and in the properties window set "Color" to "aclRed" & click on the Pin Icon and select "Alpha Color SinkPin" and set "Height" to 3 and "Width" to 3, "X" to 1 and "Y" to 1
  • In the "Elements" window drag "Draw Pixel" to the left side and in the properties window set "Color" to "aclDarkBlue" & click on the Pin Icon and select "Alpha Color SinkPin" and set "X" to 2 and "Y" to 2
  • Close the "Elements" window


  • Select "ClockMultiSource1" and in the Properties window set "Output Pins" to 3
  • Select "ClockGenerator1" and in the Properties window select "Frequency" & click on the Pin Icon and select "Float SinkPin"
  • Select "Counter1" and in the Properties window set "Initial Value" to 1, "Max">"Value" to 10 and "Min">"Value" to 10

In Visuino Connect Components

2022-12-23_18-43-15.jpg
colors.png
  • Connect "M5 Stack ATOM Matrix" pin Button [Out] to "Counter1" Pin [In]
  • Connect "Counter1" Pin [Out] to "ClockGenerator1" Pin [Frequency]
  • Connect "ClockGenerator1" Pin [Out] to "ClockMultiSource1" Pin [In]
  • Connect "ClockMultiSource1" Pin [0] to "RandomColor1" Pin [0]
  • Connect "ClockMultiSource1" Pin [1] to "RandomColor2" Pin [1]
  • Connect "ClockMultiSource1" Pin [2] to "RandomColor3" Pin [2]
  • Connect "RandomColor1" Pin [Out] "M5 Stack ATOM Matrix" > "Draw Rectangle1" pin [Color]
  • Connect "RandomColor1" Pin [Out] "M5 Stack ATOM Matrix" > "Draw Rectangle1" pin [Clock]
  • Connect "RandomColor2" Pin [Out] "M5 Stack ATOM Matrix" > "Draw Rectangle2" pin [Color]
  • Connect "RandomColor2" Pin [Out] "M5 Stack ATOM Matrix" > "Draw Rectangle2" pin [Clock]
  • Connect "RandomColor3" Pin [Out] "M5 Stack ATOM Matrix" > "Draw Pixel1" pin [Color]
  • Connect "RandomColor3" Pin [Out] "M5 Stack ATOM Matrix" > "Draw Pixel1" pin [Clock]

Generate, Compile, and Upload the Arduino Code

FLUNWNHL66H6T8O.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

If you power the ATOM Matrix module The Display will start to show random colors and you can change the speed by pressing on the button.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download it and open it in Visuino: https://www.visuino.eu