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

[Solved / Archived] Witty Pi 4 L3V7 - interupting the scehduler

11 Posts
2 Users
0 Likes
135 Views
(@andrew-simpson17)
Posts: 84
Estimable Member Customer
Topic starter
 

HI,

 

I was thinking of using your scheduler.  But, I am concerned that my customer will make a mistake with it and then cannot do anythign about it until the scheduler 'kicks' in to affect further changes.  Is there a GPIO I can pull down to 'awake' the Rpi and bypass ths scehduler at all?

 
Posted : 14/11/2024 4:33 pm
(@admin)
Posts: 491
Member Admin
 

There is no built-in funtionality that does what you mentioned, however you can always implemt it by yourself. The software is written in BASH, and modification on it should be rather simple.

Maybe a better way is to write your own script/program, which monitors a GPIO and renames the "schedule.wpi" file if that GPIO is pulled down. You can put the full path of your script/program in this beforeScript.sh file, so it gets executed on boot before running the schedule script. Renaming the "schedule.wpi" file will effectly disable the schedule script.

 
Posted : 14/11/2024 4:54 pm
(@andrew-simpson17)
Posts: 84
Estimable Member Customer
Topic starter
 

@admin Hi, sorry never got notification of a reply. Thanks for the suggestion. Looks/sounds promising 🙂

 

 
Posted : 18/11/2024 2:50 pm
(@andrew-simpson17)
Posts: 84
Estimable Member Customer
Topic starter
 

@admin If the scheduler is active and has put my Rpi on standbye then any program I have running to monitor a GPIO (to delete that file) cannot be running.  Were you thinking of the scemario of when the scheduler wakes up my Rpi and THEN it looks at whether the GPIO is pulled down? If so that would not solve my UserCase.  I think that is what you mean but just wanted to make sure

 
Posted : 04/12/2024 9:47 pm
(@admin)
Posts: 491
Member Admin
 

@andrew-simpson17 I guess I misunderstood your question. I thought you want to disable the schedule script if the the script was badly written and it prevents your Raspberry Pi from normal boot on (by immediately shutting it down). In that case the user can pull down a GPIO while booting up the Pi and the program you prepared can rename the schedule script and disable it.

Back to your question:

Posted by: @andrew-simpson17

Is there a GPIO I can pull down to 'awake' the Rpi and bypass ths scehduler at all?

Yes. GPIO-4 (BCM naming) is the GPIO that does exactly the same. It is also the GPIO that directly connects to the switch onboard, as well as the "SW" pin in unpopulated header P3. Momentally short it to GND will have the same effect like tapping the button, which turns on your Pi.

 

 
Posted : 05/12/2024 8:23 am
(@andrew-simpson17)
Posts: 84
Estimable Member Customer
Topic starter
 

Now that you said it I feel stupid.  I do this in my code already to simulate a shutdown.

So sorry for taking up with your time with this. But thank you

 
Posted : 05/12/2024 8:49 am
(@andrew-simpson17)
Posts: 84
Estimable Member Customer
Topic starter
 

@admin Hi. Just been testing this.  Is there any scenario when the RPi is off/standby, the power bank is connected (and active) and the lipo battery is connected that when you press your power/toggle switch the white light comes on briefly but the Rpi does not start up?

 
Posted : 06/12/2024 3:11 pm
(@admin)
Posts: 491
Member Admin
 

@andrew-simpson17 sounds like the MCU gets reset when the button is pressed. There is a topic for that behavior on Witty Pi 3 Mini and Witty Pi 4 Mini. But I don't think Witty Pi 4 L3V7 has this issue.

 
Posted : 06/12/2024 3:26 pm
(@andrew-simpson17)
Posts: 84
Estimable Member Customer
Topic starter
 

@admin Hmm, so should not happen with L3V7 then? But it looks like it is?

 
 
Posted : 06/12/2024 3:31 pm
(@admin)
Posts: 491
Member Admin
 

@andrew-simpson17 the symptom is similar, but the reason may be different.

If your power source can not deliver required peak current, the MCU may also get reset.

 
Posted : 07/12/2024 12:43 pm
(@andrew-simpson17)
Posts: 84
Estimable Member Customer
Topic starter
 

Thanks but the power source is fine and monitored

 
Posted : 07/12/2024 12:50 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.