Police Lights Using Atom Matrix Esp32
About the project
In this tutorial you will see how to make a Police Lights using the ATOM Matrix ESP32. Watch the Video!
Project info
Difficulty: Easy
Platforms: Arduino, Visuino, M5Stack
Estimated time: 1 hour
License: GNU General Public License, version 3 or later (GPL3+)
Items used in this project
Story
1 / 2
- ATOM Matrix ESP32 More info
- Visuino program: Download Visuino
1 / 2
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
Step 3: In Visuino Add Components1 / 4
- Add "Toggle(T) Flip-Flop" component
- Add "Delay" component
- Add "Sequence" component
- Add "Color Value" component
1 / 15
- Select "M5 Stack ATOM Matrix" board and in the properties window expand "Modules">"RGB Matrix">"Elements" and click on the 3 dots button
- In the "Elements" window drag "Fill Screen" to the left side and in the properties window select "Color" and click on the Pin Icon and select "Alpha Color SinkPin"
- Close the "Elements" window
Double click on the "ColorValue1" and in the Elements window:
- Drag "Set Value" to the left side and in the properties window set "Color" to clRed
- Drag another "Set Value" to the left side
- Drag another "Set Value" to the left side and in the properties window set "Color" to clBlue
- Close the Elements window
Select "Sequence1" and in the properties window set "Enabled" to False and click on the Pin icon and select "Boolean SinkPin"
Double click on the "Sequence1" and in the Elements window:
- Drag "Repeat" to the Left side and in the Properties window select "Elements" and click on the 3 dots button and in the Elements window drag 2X "Digital Period" to the left side and in the Properties window for each set "Delay" to 50, Close the Elements window
- Drag another "Repeat" to the Left side and in the Properties window select "Elements" and click on the 3 dots button and in the Elements window drag 2X "Digital Period" to the left side and in the Properties window for each set "Delay" to 50, Close the Elements window
- Close the Elements window
1 / 2
- Connect "M5 Stack ATOM Matrix" > "Button" pin [Out] to "TFlipFlop1" pin [Clock]
- Connect "TFlipFlop1" pin [Out] to "Sequence1" pin [Enabled]
- Connect "TFlipFlop1" pin [Inverted] to "Delay1" pin [Start]
- Connect "Sequence1" > "Repeat1" > "Digital Period1" pin [Out] to "ColorValue1" > "Set Value1" pin [In]
- Connect "Sequence1" > "Repeat1" > "Digital Period1" pin [Out] to "ColorValue1" > "Set Value2" pin [In]
- Connect "Sequence1" > "Repeat2" > "Digital Period1" pin [Out] to "ColorValue1" > "Set Value3" pin [In]
- Connect "Sequence1" > "Repeat2" > "Digital Period1" pin [Out] to "ColorValue1" > "Set Value2" pin [In]
- Connect "Delay1" pin [Out] "ColorValue1" pin [Clock]
- Connect "ColorValue1" pin [Out] to "M5 Stack ATOM Matrix" > "Fill Screen1" Pin [Color]
- Connect "ColorValue1" pin [Out] to "M5 Stack ATOM Matrix" > "Fill Screen1" Pin [Clock]
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.
Step 7: PlayIf you power the ATOM Matrix module and push the Matrix button The Display will start to flash the Red and Blue Color like police lights, if you press the Matrix button again the Display will turn off.
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
Leave your feedback...