NeoPixels and FastLEDs are a great way of creating beautiful projects for various applications. It can be a frame for a great table or a roof. Beautiful rings or some decor as well.
NeoPixel LEDs and FastLEDs are addressable LEDs which has made the hardware setup very simple and sound.
FastLEDs have only three connections
- Power supply
- Data line
The Power supply supplies 5 V or 12 V depending on the parts.
In simple terms, the Arduino will send out the values of RGB for each LEDs serially over one line. If there are 2 LEDs, the Arduino will send the data of first LED (RGB) and then sends the data of the second LED (RGB).
For a series on connected n LEDs, the data would like something like this:
Once this data passes through the first LED, the output from the first LED to the second LED looks like this:
The same thing happens with every LED in series and the final LED will only receive RnGnBn.
Let us now have a look at wokwi Arduino simulator to simulate NeoPixels and FastLEDs
Quick link for example:
FastLED and Wokwi Arduino project 1: Blink
Project link on wokwi Arduino simulator: https://wokwi.com/arduino/libraries/FastLED/Blink
The blink example should be equivalent to hello world example in the C program. Only the point to be taken care is the right pin number of Arduino. Which acts like a data pin (Pin number 3 in this example). by easily modifying the code, you can make the colour to blink Green or Blue. Can you try? you can start from here.
FastLED and Wokwi Arduino project 2: ColorPalette
Project link: https://wokwi.com/arduino/libraries/FastLED/ColorPalette
Colorpalette is the Hello world of FastLED family. This beautiful code creates a mesmerising view. You can easily change the number of LEDs as well as the Arduino DataPin to which the LED is connected. Also, take care of the power wattage of the LEDs. Arduino will not be able to supply huge currents. It is always advised to use separate 5 V adapter for the LED power supply. Make sure to keep the ground of the 5 V power supply and ground of the Arduino Common. Vary the delay or number of LEDs, get creative and create your own version of this project here.
FastLED and Wokwi Arduino project 3: "Cylon"
Project link on wokwi Arduino simulator: https://wokwi.com/arduino/libraries/FastLED/Cylon
Cylon is a first example of the 2D matrix on Wokwi Arduino simulator. It brings the user the ability to display complex patterns and also interesting GIFs and notice board style projects. To edit the size of the matrix, head to the diagram.json file in the project. The number of LEDs will be equal to the product of the number of rows and number of columns in the panel. Can you make it to display a moving dot?
FastLED and Wokwi Arduino project 4: "DigitalRain"
Project link on wokwi Arduino simulator: https://wokwi.com/arduino/libraries/FastLED/DigitalRain
For this project and all others, the original author information is retained in the code. Please feel free to play with the simulation and create your own version of digital rain!
FastLED and Wokwi Arduino project 5: "Fire2012"
Project link on wokwi Arduino simulator: https://wokwi.com/arduino/libraries/FastLED/Fire2012
FastLED and Wokwi Arduino project 6: "LEDFace"
Project link on wokwi Arduino simulator: https://wokwi.com/arduino/libraries/FastLED/LEDFace
FastLED and Wokwi Arduino project 7: "MetaBalls"
Project link on wokwi Arduino simulator: https://wokwi.com/arduino/libraries/FastLED/Metaballs
FastLED and Wokwi Arduino project 8: "XYMatrix"
Project link on wokwi Arduino simulator: https://wokwi.com/arduino/libraries/FastLED/XYMatrix
Please feel free to join Wokwi for discussions and new updates about Arduino simulators and you can suggest :)