Esempio n. 1
0
        public Monitor(TemperatureReader temperatureReader, ILoggerDisplay loggerDisplay)
        {
            _temperatureReader = temperatureReader;
            _temperatureReader.MeasurementComplete += TemperatureReaderMeasurementComplete;
            _temperatureReader.LightLevelMeasurementComplete += _temperatureReader_LightLevelMeasurementComplete;
            _loggerDisplay = loggerDisplay;
            _timer = new Timer(new TimeSpan(0, 0, 1, 0));
            _timer.Tick += _timer_Tick;

            Pressure = "2";
            _hasPressure = true;
        }
Esempio n. 2
0
        void ProgramStarted()
        {
            Debug.Print("Program Started");

            _loggerDisplay = new LoggerDisplay(display_T35);
            _temperatureReader = new TemperatureReader(temperatureHumidity, lightSensor, _loggerDisplay);
            _temperatureReader.Start();

            //_rfidMonitor = new RfidMonitor(rfid, _loggerDisplay);
            //_statusMessageMonitor = new StatusMessageMonitor(relay_X1, _loggerDisplay);
            //_buttonMonitor = new ButtonMonitor(button);

            _networkConnection = new NetworkConnection(ethernet_J11D, _loggerDisplay);
            _networkConnection.NetworkUp+=NetworkConnectionUp;
            _networkConnection.NetworkDown+=NetworkConnectionDown;
            _networkConnection.Initialize();

            _monitor = new Monitor(_temperatureReader, _loggerDisplay);
        }