On System#Boot do    //When the ESP boots, do
  gpio,14,0
  timerSet,1,1      //Set Timer 1 
endon

On Rules#Timer=1 do  //When Timer1 expires, do
    if [out#t]>[in#t]//abs function
      TaskValueSet,verschil,1,[out#t]-[in#t]
    else
      TaskValueSet,verschil,1,[in#t]-[out#t]
    endif
 LCD,1,1 'Opwarming:[Verschil#t]'   
 LCD,2,1 'Pomp:[PompSwitch#state]'
// gpio,14,PompSwitch#state
 timerSet,1,1      //Resets the Timer 1 
endon

on Details#state=1 do
  timerSet,1,4
  LCDCMD,clear
  LCD 1,1 '%ip%'
  LCD 2,1 '%ssid%'//'%sysname%'
endon

on Details#state=11 do
  timerSet,1,4
  LCDCMD,clear
  LCD 1,1 'in:[in#t],uit:[out#t]dak:[dak#t]'
  LCD 2,1 'uit-in:[verschil#t],[dak#t]'
endon


on PompSwitch#state do
if [PompSwitch#state]=1
  gpio,14,1
else
  gpio,14,0
endif
//  timerSet,1,4
//  LCDCMD,clear
//  LCD 1,1 '[PompSwitch#state]'
endon