Go Down

Topic: Fading LED that goes through a few cycles, and stops (Read 327 times) previous topic - next topic

ArthurPeale

I'm attempting to make an ornament based on the TARDIS.  I have an ATTiny45 chip programmed with the analog fade demo, and it works quite well.  But instead of having it on, all of the time, I'd like to be able to press a button, and have it cycle through the fade sequence, perhaps a dozen times, before turning itself off, so the battery isn't being wasted.

Eventually, I'd love to have it play the TARDIS sound  as it does that (but, as this is my first foray, baby steps!).

Suggestions as to how I can implement this?

Erni

Quote
cycle through the fade sequence, perhaps a dozen times


You could make a loop in the setup() runing a dozen time, and nothing in the loop()

Next step could be putting the chip to save current by sleeping

ArthurPeale

That sounds brilliant; then, it would "wake" upon button push?

Erni

Quote
That sounds brilliant; then, it would "wake" upon button push?


yes, that was the idea

Go Up