You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I succesfully downloaded your firmware and made a change where the LEDs now stay on and make a rainbow pattern.
I was wondering how you would make a timer function in the macropad.c file?
I seem to be able to include time.h, but I keep getting syntax errors on using clock_t ..
if(NeoHue == 191)
{
NeoHue = 0;
}
else
{
// add clock function here so LEDS transit smoother
NeoHue += 1;
}
for (i = 0; i < 6; i += 1) // for every neopixel
{
NEO_writeHue(i, NeoHue, NEO_BRIGHT_KEYS);
NEO_update();
}
The text was updated successfully, but these errors were encountered:
You can use one of the timers/counters of the CH552. If precise timing is not required, I simply use a counter variable that decrements in the loop. When it reaches ZERO, the desired action is executed, and the variable is reloaded with the desired value.
Hi,
I succesfully downloaded your firmware and made a change where the LEDs now stay on and make a rainbow pattern.
I was wondering how you would make a timer function in the macropad.c file?
I seem to be able to include time.h, but I keep getting syntax errors on using clock_t ..
The text was updated successfully, but these errors were encountered: