Notifications
Clear all

WittyPi 4 Mini - Last action button vs power restore.

2 Posts
2 Users
0 Likes
48 Views
(@marcot77)
Posts: 7
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: 315
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
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.