I am working on a nixie clock. For backlight I have used Adafruit's Neopixel digital LEDs(based on WS2812). My idea is that color of nixie tube's backlight will reflect which part of minute/hour/day it is. I have taken WS2812 component from somewhere on this forum, and written the code. Also, I did not write color space conversion myself, but I have rewritten some code found on the internet.
The problem is that at 54th second the color does not change as expected, but immediately changes to something like red.
To better diagnose the error, I have rewritten the code to C# Windows Forms appplication. In this form, the code, which is to my knowledge the same, does work as expected.
Can someone take a look at my code, and help me find the difference? I think the difference is not in the code itself, but in the architecture;,but I do not know so much about MCUs.
Can you please post your complete PSoC project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Convert this line in main.c:
col.h = (unsigned char)((double)local_sec * 270 / 60);
col.h = (unsigned char)((double)local_sec * (double)((double)270 / (double)60));
and tell us about your observation
Thank you for reply. I have reprogrammed PSoC, however I can't test it on hardware now. I will let you know, when I will test it.