# Math (Arithmetic?) for flickering PoV w/2 colors

Experts,

This is not meant to be a complicated PoV scenario, but simple with 2 colors.

I want to wave/move a strip of LEDs on a stick, say, and give the appearance of 2 colors alternating (like lines) when waved or moved. But when the strip is still, you don't see the 2 colors... more like a summation of their values. I'm not talking shapes, images, or text, or anything that I assume needs positional feedback-just a strip alternating 2 colors. So, if you chose red and blue, a wave would show vertical lines of alternating red & blue, in the same axis as the strip (meaning all LEDs are same color), and not something like 'every other LED'.

What I lack is any idea as to which libraries (I'm using WS2812Bs), timings, or adjustments can be made to give this visual, or similar.

The Interwebs are packed with spinning globes and wands that draw images, but this is a far simpler, initial stepping stone. I am curious how Arduino code can alternate colors on the string (all colors change at once) fast enough, and what blink rates have been found to be effective, and even be kind to battery supplies.

Sorry for the painful attempt at explanation. I appreciate your patience.

I think the on chip PWM that the NeoPixels use, would render a POV display very ugly.

Use the fastled library and set the pixel’s color then issue a show.

@J-M-L Thanks for the reply, but I was asking about the timing. Examples of what the eye would be shown for a single RGB LED, alternating 2 colors, would be a cycle of these events:

1. Nothing lit-all values 0.
2. The first color ("A") turns active/high/on.
3. [optional?] The RGB LED is set to a combination of colors A and B...
4. The second color B is shown on LED.
5. LED goes back to all low.

This single LED (or line of them in OP) looks like one color, possibly slightly flickering, when held to the eye stationary.

But when the LED is moved (a la back & forth, on a wheel, etc.), the eye can see the 2 distinct colors via PoV.

2 things control this, and I am asking where to start:

1. The flashing/cycling rate between the 2 colors, the duration (duty cycle) of eah, etc., and...
2. The 'speed' that the LED is moved across the viewer's vision.

For reference:

You will notice on PoV projects with letters/words, or maps/imagery, etc. that one part of this synchronization is taken care of by a mechanical feedback mechanism that essentially tells the display when to start over. This is most often done with a Hall Effect sensor, but would be anything that works-including optical.

So as you can see, if not doing absolute positioning (like flashing colors) this positional information isn't needed. If you were doing a clock or something, it would be vital-UNLESS of course the 'speed' of the display is constant.

I hope this conveys the nuances of the issue better than my OP for any potential contributors!

...and, additionally, as I pointed out, the PWM that is used on each LED to control the brightness.

Also, how long is your string? It takes some time to update a string, and the time increases with the number of LEDs. That would distort a POV pattern.

I still don’t see it.
Your LED strip has a refresh timing that is proportional to its length and microcontroller’s capability. Other type such as APA102 would be less sensitive to the timing on the arduino (allowing for more processing).

The way I see it is
Check (sensor of choice) if there is movement or not
If stable, just keep one color, no update.
If it’s moving, enter a blink code where you control the alternating display frequency

The decision to go for intermediate blended colors could be explored.
Retinal persistance will play a role as well on how fast you can blink before your eye only sees a blended color

I’m probably missing something in your POV explanation…

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.