probably a easy question, but couldn´t find the right answer. I am looking how to switch on and later off a microcontroller (anything small) by just pressing a button.
What I want to do: I have a little LED project. When Someone is pressing a button, an animation will start (I can do this with arduino myself). When Pressing the button,again the next animation should start. When long pressing, the system should switch off completely to safe energy. Basically like a bike backlight with different strobe effects.
Here's a circuit I've used. The push button turns on the power, but it also serves as an input device to the processor. See if you can understand how the power stays on, and how the processor can turn it off after a long press.
I think I understand your circuit. I am not going to post the workings here, so Kresi can still have a learning experience. But it does require some lines of code for the power to stay on right?
Hi,
thanks @ShermanP for your circuit. I will have for sure have some learnings here. Could you please explain what the part labeled on the top with S/D is? Is this a kind of rectifier?
Sorry for asking. I learned myself to read most of these schematics but still learning ;-).
@Mardec: if you have made something working, it would be appreciated to learn from you too