Oh, 40 times per second be too many - Sorry, I was thinking about "detecting a button push" for another project. THAT would be 40 times a sec (so you could "tap" the button for less than say 1/20 sec and still catch it).
The plant watcher could clearly wake up hourly or even more, I need to see what the longest sleep time is - I recall the tiny chips don't have a prescaler so need to wake fairly often?
Just to mention (let me know if I should start a new thread), the "pushbutton" idea:
You can buy little 3xAAA "desk lamps" that are about a foot high, and have 14 LEDs in the head.
They have a single on-off pushbutton.
Just as an educational project, but also moderately useful, and possibly for inclusion in a "build your own" session at a sci fi convention, I'd like to do this:
Replace the on-off switch with a single momentary pushbutton.
Have a small PIC running in sleep mode waking up to look at the button (footnote 1)
Button use:
- tap = on or off
- hold: starts (via pulse width modulation) getting dimmer / brighter, in a sine wave sort of way - you release the button when it is at the brightness you want,
- hold AGAIN it reverses direction, so for ex if you wanted dimmer and you hold and it starts getting brighter, just release and press/hold again.
- "advanced" - Not sure how to do this from a user interface, but if say you tap it 4 times, you go into "auto-shut-off" mode, in which you then tap the time you want it to run (x x x x = 4 x 15 minutes = 1 hr?) . . I don't know, just "brainstorming".
Thanks for the tips - I recall ULPWU, and will review my docs, thanks!!!
__________
Background: I learned of a "build a blinky" session at
**broken link removed** - where they use 12F683 and 16F688 to build little "badge-size" blinkies - from a 6-circle to a 5x7, and use IR so 2 badges sync to the same pattern, etc.
It gives people who maybe never held a soldering iron, or knew that "chips" exist, to build something "fun" for $10. Well, I got hooked on PICs (though I'd bought a UV-erasable set many years ago that I never actually programmed), and enjoy the tools available, the simple USB programmability, etc.
SO other than "blinkies" I'm often on the lookout for "what can we do for Duckon next year".
The 2 d's (Dwayne and Doug) who came up with this stuff and run the blinky session are at
http://www.2dkits.com and if anyone reading this wants an inexpensive PIC blinky project, you can get them there. These guys are out to 'break even' tho I'm not even sure they do that, so prices are good.