Exemplo n.º 1
0
 public DomoteerWebServer(EthernetJ11D eth, MulticolorLED led, DisplayT35 display, Sensore_Temperatura_43 s)
 {
     this.eth          = eth;
     this.led          = led;
     this.display      = display;
     temperatureSensor = s;
 }
Exemplo n.º 2
0
        void ProgramStarted()
        {
            first     = true;
            time_sett = Resources.GetString(Resources.StringResources.PIR_Sensor);

            #region SENSORE TEMPERATURA
            s = new Sensore_Temperatura_43();
            s.setup();
            Temperatura t     = s.getTemp();
            double      valor = t.BinToCelsius();
            #endregion

            #region SERVER
            server = new DomoteerWebServer(ethernetJ11D, multicolorLED, displayT35, s);
            server.initConnection();
            server.RunWebServer();


            #endregion

            #region PIR

            pir = new PIR_Module(extender, server);

            #endregion

            #region SENSORE GAS
            sens = new Gas_Sensor(extender);
            #endregion

            #region TIMER_GAS
            timer_gas       = new GT.Timer(20000);
            timer_gas.Tick += new GT.Timer.TickEventHandler(Timer_Gas_Tick);
            timer_gas.Start();

            #endregion

            #region TIMER_AGGIORNAMENTO_SCHERMO
            timer_display       = new GT.Timer(5000);
            timer_display.Tick += new GT.Timer.TickEventHandler(Timer_Display_Tick);
            timer_display.Start();
            #endregion

            button.ButtonPressed += new GTM.GHIElectronics.Button.ButtonEventHandler(GetTemperatures);

            setupWindow();
        }