Page 1 of 1
Store current pressure
Posted: 05 Dec 2014 07:18
by DashDriver
I need to take the current value from the pressure sensor and store it in a global variable. Whenever I try, however, pressure comes up as having a null value. Anyone have an idea what's going on?
Re: Store current pressure
Posted: 05 Dec 2014 09:51
by Martin
Hi,
A flow like this should work:
-trigger ...
-condition Pressure Sensor: > 0mbar
--> true: -action Script: global_pressure = pressure;
Please note that the condition only works when the device allows to read the pressure sensor values when the screen is off and when the sensor allows to read the current value, otherwise the flow will stop with a timeout error.
Regards,
Martin
Re: Store current pressure
Posted: 05 Dec 2014 23:01
by DashDriver
Thanks Martin! It seems that the Pressure Sensor: > 0mbar condition is necessary before you can capture the current pressure in a variable.