Hardware Reference
In-Depth Information
commenting out the fade functions so the building blinks LEDs on and
off rather
than fade LEDs on and off.
The original code is still all there if others wanted to keep playing
with it;
just take out the duty cycle comments.
The delays have also been changed, but can easily be reinstated by
looking at the
original code:
https://github.com/strykeroz/ATTiny85-20-LED-snowflakes/blob/master/
ATTiny85
_Charlieplex20Snow.ino
*/
I explained each of my code alterations by commenting that I altered the code from the
original. I used a charlieOFF command rather than the original charlieON com-
mand in line 121.
Click here to view code image
------>
if (current > 19) charlieOFF(19); //This is altered from the
original code, to
turn LEDs off once the blink is over
I explained in another portion of the code that I commented out the time delays for fad-
ing an LED so it blinks rather than fades:
Click here to view code image
current++;
if(current==23) { //// start over
//Alicia commented out the below code to make the LEDs blink on
and off
rather than fade out.
//// now fade out the snowflake in that final position #19
for(int dutyCycle = 3; dutyCycle <= 15; dutyCycle += 3) {
//loopCount = 0;
//timeNow = millis();
//while(millis() - timeNow < (displayTime+current*2)) { //// fade
out as
slow as animation has achieved by now
// loopCount++;
if(!(loopCount % dutyCycle)) charlieON(19);
else charlieOFF(19);
// }
}
Search WWH ::




Custom Search