Custom code - Creating python loops based on logger value

Using the custom code, I have the AutoPi to beep at me if i am speeding over 110km/h, however it will beep only once when I initially go over the set speed.

I then added a python while > 110 loop, with a break < 110 - However it then always beeped regardless of speed if i went over 110 throughout any part of the trip. While it was in the loop, the speed stopped being logged to the cloud or MQTT

I then added a python exit command directly after activating the beep, thus it would only beep once over the set speed limit, however if the vehicle was over the limit, it would also not log to the cloud or MQTT.

I am merely tweaking parts of the custom python code to achieve this - I obviously have no previous experience with python and need some of the great minds in this community to help me out with a new code, that simply runs a command, and continues to repeat the command while over a set threshold from a logger, and while over that threshold to also log the logger value to the cloud as it would normally. Any thoughts?

Where this could be used is, if the engine temperature was over a set value (i.e it is too hot and your about to seize the engine potentially) it would be good to have a repeating beep while it is over temp for example

Perhaps @Malte is able to help with this?

This topic was automatically closed 33 days after the last reply. New replies are no longer allowed.