[vz-users] Betriebsstundenzähler über Schaltzustand Brennner
    dl4huf 
    dl4huf at t-online.de
       
    Sat Mar  9 16:28:13 CET 2013
    
    
  
Hallo Carsten
Ich komme leider z.Z. nicht dazu, habe da aber auch Interesse an einer 
funktionierenden Lösung, deshalb als keine Hilfe grob die Funktion in 
Control6
Gruß Ronald
C6_HEADER(`/* This will be in control6.h */')
CONTROL_START
CLOCK_USED()
   PIN_INPUT(InputName)
   PIN_PULLUP(InputName)
   PIN_OUTPUT(LED)             /* Kontroll-LED */
   ECMD_GLOBAL(z, -1, uint16_t);
   THREAD(zaehler)
       HTTPLOG("<uuid>.json?ts=%lu000&value=1", clock_get_time());
       PIN_SET(LED);
       WAIT(1);
       z=z++	
       ON PIN_FALLING(InputName) DO THREAD_RESTART(send) END
   THREAD_END(zaehler)
  THREAD(send)
      HTTPLOG("<uuid>.json?ts=%lu000&value=%s",clock_get_time(),z);
      PIN_CLEAR(LED);
      zaehler=-1
      HTTPLOG("<uuid>.json?ts=%lu000&value=0", clock_get_time());
      THREAD_STOP(Heizung)
  THREAD_END(send)
   ON PIN_RISING(InputName) DO THREAD_RESTART(zaehler) END
CONTROL_END
    
    
More information about the volkszaehler-users
mailing list