Change Random Colors NeoPixel Shield Adafruit & Arduino - 40 RGB LED Pixel Matrix

by RonFrtek in Circuits > Arduino

124 Views, 1 Favorites, 0 Comments

Change Random Colors NeoPixel Shield Adafruit & Arduino - 40 RGB LED Pixel Matrix

Change Random Colors NeoPixel Shield Adafruit & Arduino

In this tutorial we will learn how to use Adafruit NeoPixel Shield for Arduino - 40 RGB LED Pixel Matrix by randomly changing each Pixels color.

Watch the Video!

What You Will Need

8e0732970d282cde55616075a620930c615a0953_original.jpeg
VisuinoAdvrtisementPortentaH7.jpg
uno.jpg
  • Adafruit NeoPixel Shield for Arduino - 40 RGB LED Pixel Matrix More Info
  • Arduino UNO
  • Visuino software: Download here

The Circuit

1430-02.jpg

Attach the Shield to Arduino Uno, You can find More Info here

Start Visuino, and Select the Arduino UNO Board Type

F3UOF8GKU2NWUE7.jpg
Visuino-Select-Board-UNO.jpg

The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.

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 "Arduino UNO" as shown on Picture 2

In Visuino Add Components

2022-04-25_12-30-41.jpg
2022-04-25_12-48-32.jpg
2022-04-25_15-53-14.jpg
2022-04-25_15-56-10.jpg
  • Add "Counter" component
  • Add "Clock Generator" component
  • Add "Random Color" component
  • Add "NeoPixels" component

In Visuino Set Components

2022-04-25_15-56-53.jpg
2022-04-25_15-58-53.jpg
2022-04-25_16-02-50.jpg
2022-04-25_16-04-33.jpg
  • Select "ClockGenerator1" and in the properties window set "Frequency" to 5 <<this will be the speed of changing the color, you can change the frequency if you want
  • Select "Counter1" and in the properties window set "Max" > "Value" to 40 and "Min" > "Value" to 0
  • Double click on the "NeoPixels1" and in the "Pixel Groups" window Drag ""Color Pixel" window" to the left side and in the properties window set "Count Pixels" to 40
  • Close "Pixel Groups" window

In Visuino Connect Components

2022-04-25_16-10-19.jpg
  • Connect "ClockGenerator1" pin [Out] to "Counter1" pin [In]
  • Connect "Counter1" pin [Out] to "RandomColor1" pin [Clock]
  • Connect "Counter1" pin [Out] to "NeoPixels1" > Color Pixel1 > pin [Index]
  • Connect "RandomColor1" pin [Out] to "NeoPixels1" > Color Pixel1 > pin [Color]

Generate, Compile, and Upload the Code

Visuino-Compile-UNO.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 Arduino module the LED Pixel Matrix Pixels will start to randomly change color.

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