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

[Solved / Archived] WittyPi 4 Mini - Last action button vs power restore.

3 Posts
2 Users
0 Likes
345 Views
(@marcot77)
Posts: 8
Active Member
Topic starter
 

Hi. I'm reading the register 11 to act differently at boot between a scheduled boot and the button press. I have set the WittyPi 4 mini to boot automatically when power is restored. Is it possible that the code 0x03 is assigned for both the scenarios? Is there a way to distinguish them?

Thanks.

 
Posted : 17/04/2024 2:59 am
(@admin)
Posts: 479
Member Admin
 

The current firmware does not set the register #11 (I2C_ACTION_REASON) for startup due to power connection/restoring. So in such case the register keeps the value that prevously set.

We will add one more reason code for this scenario in next revision of firmware. Meanwhile if you want to do so by yourself, you may put

updateRegister(I2C_ACTION_REASON, 9 /*or any unused number you prefer*/);

above this line.

 

 
Posted : 17/04/2024 8:18 am
(@admin)
Posts: 479
Member Admin
 

The new values for register #11 has been added in firmware reversion 6.

 
Posted : 18/06/2024 3:01 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.