Hello. I'm working in my LED clock.

Hello.

I’m working in my LED clock.

I finished the basic features but I’m blocked with the extras. I had a few ilumination modes but I want to add a new one.

I had a WS2801 strip with 60 leds. I show the hor with 3 red leds and minutes with a blue one. I want tha the seconds left an stella, but i have no clue how to do it.

All my tries had been wrong.

Here is the main program: https://gitlab.com/dardoware/Arduino_LEDClock/blob/master/arduino/ledClock_sam/ledClock_sam.ino

And here is the file where is the function that sets the values to the led array: https://gitlab.com/dardoware/Arduino_LEDClock/blob/master/arduino/ledClock_sam/modo_estelas.ino

I’m sure that I dint’t something completele wrong.

Any clue about how to achieve my goal it’swellcome.

Hi Samuel, I tried to look into your code but got totally lost between the Spanish and the number of files you use. Excuse my very poor Spanish but I assume you want the second LED to twinkle like a star !

To achieve this you will simply need to update that LED faster than once per second.

Do you want a soft slow constant update like a linear ramp-up and ramp-down or a sine wave for a softer effect ?

D you want a more random blinking that emulates a real star ?

You will need to play with the number of update per seconds that will achieve the final effect you want.

I would also suggest that you could use something like a softer movement of the seconds LED using the following antialiasing example created by Mark Kriegsman…

From a fellow clock maker…

https://plus.google.com/106626345342202981932/posts/SM62KcSTgon

Thanks for your fast reply.

I don’t care about a linear ramp or a sine effect, I’ll test both anyway. Now I get 55 updates per second.

Now I have a three (simple) visualization modes without antialiasing, and it’s definitively somethong that I want to test.

I’ll try it later today.

Thanks!

I was studing the demo that you recomended, but I don’t know how to do it.

I refresh the leds at a given rate ie 16 times per second, and i want to dim one led 1/16th of it’s britghtness each iteration an lit the next increase the brightnes by the same amount.

I know how to do it with HSV colors, because it’s very simple reduce only de value of the color, but i had coded my color palettes with RGB values and I don’t find an easy way to reduce the brigthness of a RGB color.

I’m sure that had to be an easy way to do it. I though in create an CHSV auxiliar variable and the assing it to my pixel, but I didn’t found a way to convert a CRGB color to CHSV one.

Hi @Samuel_V.G ,

I do not believe that he library supports a RGB2HSV function ?

I remember some discussion about the possibility of introducing that but maybe @Mark_Kriegsman can confirm this ?

There is of course, color math operations available for the CRGB data.

Look here…

We do have an approximation for hsv2rgb; it’s like this:

CHSV hsv;
CRGB rgb;

rgb = hsv2rgb_approximate;

See detailed discussion at https://plus.google.com/112916219338292742137/posts/Rxx6RpgpSr2?gl=us