alternating screens on display with different sensor readings #22065
-
Dear all, I guess there is a much simpler solution for a rule for alternating screens containing different sensor readings (in my case on SH1106 display). Do you have an idea? No need to mention that this is my first contact with rules. Thank you in advance.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What I'd suggest is not "simpler" but instead working better (if my assumptions about your intentions are right). The rules you post there have two issues. First, the Second, updating rule set status very often contributes to flash wear, to the detriment of flash lifetime, which could be a factor if aiming for a reasonably quick update cycle. While it is possible to turn off saving via the One way could be to change the rules to pick up sensor values to instead save last value in a variable for each, like Then you could have your cycle of 4 seconds (or what you want) using Updating each in the cycle could then be rules like: However, if your device is based on the recommended ESP32, you have much better options for managing the updating via the Berry language, instead of using rules. |
Beta Was this translation helpful? Give feedback.
Right, nothing will indeed work, until you make sure to start and restart the
RuleTimer
, which means restarting it every time it popped (in the rule settingvar9
), and making sure to start if after boot, like from a rule triggered bySystem#boot
.But still, if you are using ESP32, I really cannot recommend sticking with rules, as there are many special quirks needed to get things working there.