Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ChangePalettePeriodically()
- {
- uint8_t secondHand = (millis() / 1000) % 60; //számláló másodpercenként 0-59 között.
- static uint8_t lastSecond = 99;
- if( lastSecond != secondHand) { //Jól sejtem hogy ez a 2 sor annyit csinál hogy csak
- lastSecond = secondHand; //Másodpercenként engedi lefutni az if utáni részeket?
- if( secondHand == 0) { targetPalette = Blue_Green_gp; }
- if( secondHand == 20) { targetPalette = Deep_Sea_gp; }
- if( secondHand == 40) { targetPalette = Incandescent_gp; }
- if( secondHand == 60) { targetPalette = Purples_gp; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment