I am in the process of making a very simple beginner project in a somewhat serious manner with own PCB, plexiglass cover, lion battery with charger etc. all fancy and shining ready-to-use device, no more breadboard+modules crap. Just for fun and practice.
It is basically a bunch of sensors over atmega8 and display. Because you know everyone needs to know how many moisture you have in your air sometimes =)
What I am interested to do is 1 button device. 1 click to power on, then clicks to switch what to display then hold on to power off. To make this I mix some tricks I already know with parts I own.
The idea is when you press the button current goes to VCC through diode and powers on the controller which then pulls up MOSFET by PCON pin. then you can use the button to interact with SW pin by clicking. And if you press the button for a couple of seconds PCON goes low and power switches off.
Well, my question is "am I doing it right?". Because for me as a beginner it seems a little too easy to work fine =)
Thank you for your time!