Author Topic: How do I detect a temperature drop on a sensor. In Pleg?  (Read 379 times)

Offline Biksbj

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
How do I detect a temperature drop on a sensor. In Pleg?
« on: October 04, 2018, 09:33:18 am »
I have something I have to stop if there is a temperature drop on one and the same sensor.
I can not figure out how to save the sensor value so I can use this and see if it's higher than current value.
Please help me, I've tried everything I've been able to figure out.

Offline kigmatzomat

  • Sr. Member
  • ****
  • Posts: 365
  • Karma: +21/-0
Re: How do I detect a temperature drop on a sensor. In Pleg?
« Reply #1 on: October 07, 2018, 08:47:31 pm »
I have not tried this and there may be something more elegant.

Use the STATE variable to define a sequence (a,b,a,b,a,b....)

Store the current temp to A or B as the state flips
Atemp:   When state=a then temp
Btemp: when state=b then temp

Tempdrop
If(state=a and Btemp>Atemp) or (stat=b and Atemp>Btemp)


Again, haven't tried it but at first blush it should work.

Offline jennytrump

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: How do I detect a temperature drop on a sensor. In Pleg?
« Reply #2 on: October 27, 2018, 02:38:23 am »
You can see the two spikes where it suddenly jumps up, peaks and drops at a lower rate.
Using the Multisensor you can also control lights based on motion or how dark it is and heat lamps based on temperature.

Offline Biksbj

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: How do I detect a temperature drop on a sensor. In Pleg?
« Reply #3 on: November 08, 2018, 09:21:33 am »
Sorry, but I do not understand what will be the answer here.
Is there a possibility that I get it described in the process that should be done?