WS2812 is one type of programmable RGB LED. It is sold in the form of bars, rings, strips or individual LEDs. It allows you to create an infinite number of colorful effects. You can find basic information on these pages. The common name for these LEDs is NeoPixel. This is because Adafruit was the first company to write a library to control them and call it NeoPixel.
NeoPixel is sold in various shapes.
Flashing fire simulation.
This article describes an algorithm that simulates a burning fire. This is my first attempt to simulate fire. The simulation was run on NeoPixel Ring with 24 LEDs. The simulator is not designed for direct viewing. Place it next to the white wall on which it produces flickering like a real fire in the fireplace.
Two years ago, I programmed a fire simulation for Arduino Uno. In this article, we try to do this simulation using the ATtiny85 microcontroller. To prevent the program from being exactly the same, we modify the simulation slightly to set the flashing of the flame.
This project was created by accident. I was thinking about the new NeoPixel project and looking at the old source code. I loaded a fire simulation program into Arduino and accidentally caught a NeoPixel Ring in my hand in a dark room. And I was amazed to see what an interesting image was created on my hand. Then all you had to do was take a camera and film different hand positions and the NeoPixel Ring.
HSV color space.
The NeoPixel Ring contains at each point three LEDs that make up a pixel. The resulting color is set using three RGB components. Such coloring is complicated for man, because not everyone can imagine the resulting color, which consists of three components. To facilitate color adjustment, a HSV (hue, saturation, value) model is used to mix these colors with:
The boring theory of the transformation between the color space HSV and RGB is shown in the previous article. In this article we will use the HSV color space again. We'll create rotating animations on NeoPixel Ring using it. We will create three different animations that will be based on a simple algorithm. A simple algorithm does not mean that the result will be ugly. On the contrary. Simple algorithms can also create interesting effects.
In the discussion of the video about rotating circles the question was raised whether the red color could not be adjusted to other colors. This article is about finding the right color. Using three potentiometers, you can customize the basic HSV color model and you can also set the rotation speed.
Previous articles (0, 1, 2) and videos on using the HSV (hue, saturation, value) color model have shown that readers still have difficulty setting the right value to obtain the desired color on the rotating ring. We'll try to resolve this in this article. Using the two buttons and an OLED display we set an appropriate color and its value can be read directly on the display.
I have written several articles about the NeoPixel Ring. I usually inserted it in a breadboard so I could take a picture of it. But there are situations where this is not the most appropriate solution. Fortunately, I was able to buy a tool to solve this problem. Yoga block, which they sell in sports shops or in shops with small household items. I have no idea how to practice yoga with a brick, but it is a solid piece of foam rubber into which the NeoPixel is easily attached.
In this article, we will explain how we can program the c++ class Rotator, which will make it easier for us to control the NeoPixel Ring. This class has several parameters that define the color and saturation on the ring. The Rotator class itself creates the gradual darkening of colors into the shape of a tail and also provides color animation around the circumference of the ring.
In the previous article, we programmed the class Rotator and now we will use it to create an interesting animation. We will use 3x NeoPixel Ring and with the help of a phase shift we will create an effect in which three glowing dots with a colored tail will seem to move against each other. It's just an illusion, all three points are moving in the same direction.
Pomocou NeoPixel Ring s 12 LED som vytvoril sériu článkov na tému ako si postaviť svietiace hodiny: