Random Color Led Arduino Nano Esp32 Using Visuino

About the project

Randomly change color on the Arduino ESP32 Internal RGB LED, the colors will not change immediately but will ramp up to the desired color.

Project info

Difficulty: Easy

Platforms: ArduinoVisuino

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Arduino Nano esp32 Arduino Nano esp32 x 1

Software apps and online services

Visuino Visuino
Arduino IDE Arduino IDE

Story

Step 1: What You Will Need

1 / 2

Step 2: Start Visuino, and Select the Arduino Nano ESP32 Board Type

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

Step 3: In Visuino Add Components

1 / 4

  • Add "Pulse Generator"
  • Add "Clock Multi Source" component
  • Add 3X "Ramp To Analog Value" component
  • Add 3X "Random Analog Generator" component

Step 4: In Visuino Set Components

  • Select "ClockMultiSource1" and in the properties window set "Output Pins" to 3

Step 5: In Visuino Connect Components

1 / 2

  • Connect "ClockGenerator1" pin [Out] to "ClockMultiSource1" pin [In]
  • Connect "ClockMultiSource1" pin [0] to "RandomAnalogGenerator1" pin [Clock]
  • Connect "ClockMultiSource1" pin [1] to "RandomAnalogGenerator2" pin [Clock]
  • Connect "ClockMultiSource1" pin [2] to "RandomAnalogGenerator3" pin [Clock]
  • Connect "RandomAnalogGenerator1" pin [Out] to "RampToValue1" pin [In]
  • Connect "RandomAnalogGenerator2" pin [Out] to "RampToValue2" pin [In]
  • Connect "RandomAnalogGenerator3" pin [Out] to "RampToValue3" pin [In]
  • Connect "RampToValue1" pin [Out] to Arduino Nano ESP32 > RGB > Red pin [Digital]
  • Connect "RampToValue2" pin [Out] to Arduino Nano ESP32 > RGB > Green pin [Digital]
  • Connect "RampToValue3" pin [Out] to Arduino Nano ESP32 > RGB > Blue pin [Digital]

Step 6: Generate, Compile, and Upload the Project

  • 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: Play

After uploading the project to the Arduino Nano ESP32 the internal RGB LED will start to randomly and slowly change colors.

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

Schematics, diagrams and documents

Visuino File

Code

Visuino File

Credits

Photo of Ron

Ron

Arduino Developer

   

Leave your feedback...