Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

[Solved / Archived] Witty Pi4 + Raspberry Pi 4: Instant on, delayed off when pushing power button?

3 Posts
2 Users
0 Likes
473 Views
(@vidar-kvalevag)
Posts: 0
New Member Customer
Topic starter
 

Hi 

I am using Witty Pi 4 together with Raspberry Pi4 in a project in order to power it down in a controlled manner. At the moment I am not using any of the scheduling possibilities but the RTC functions are useful as the PI gathers data and put it into an Influx database.  

My question is: 

Is it possible to add a delay when the user pushes the power button to turn the device off? So that the user does not turn it off by accident, but has to push and hold the button for 3 seconds before the unit shuts down? 

Would be great if anyone could put me in the right direction 🙂 

 

 
Posted : 16/06/2023 11:37 am
(@admin)
Posts: 477
Member Admin
 

You will need to modify the software (and maybe also the firmware) to achieve this.

Some customers already tried this on Witty Pi 3: https://github.com/uugear/Witty-Pi-3/pull/7

You can do the same on Witty Pi 4. However it is better to also modify the firmware accordingly, because when the button is clicked, the firmware already mark the state as "turning off" immediately, I am not sure if that will cause some unexpected behavior if Raspberry Pi doesn't shutdown and continue to work.

 

 

 

 
Posted : 16/06/2023 12:07 pm
(@vidar-kvalevag)
Posts: 0
New Member Customer
Topic starter
 

Thanks for the quick response to my question. We will have a look and check if we can use this approach. 

 
Posted : 16/06/2023 2:13 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.