示例#1
0
 public Gas(GasSense g, Wifi wifi)
 {
     this.wifi = wifi;
     this.gs = g;
     _getReading.Tick += new GT.Timer.TickEventHandler(_getReading_Tick);
     _preheat.Tick += new GT.Timer.TickEventHandler(_preheat_Tick);
     _getReading.Start();
 }
示例#2
0
 public Gas(GasSense g, Wifi wifi)
 {
     this.wifi         = wifi;
     this.gs           = g;
     _getReading.Tick += new GT.Timer.TickEventHandler(_getReading_Tick);
     _preheat.Tick    += new GT.Timer.TickEventHandler(_preheat_Tick);
     _getReading.Start();
 }
示例#3
0
        /// <summary>
        /// Testing method for GasSense module (function never returns)
        /// </summary>
        static void TestGasSense()
        {
            //test button, light sense, gas sense, temp humid
            GasSense gas = new GasSense(FEZRaptor.Socket14.AnalogInput3, FEZRaptor.Socket14.Pin4);

            while (true)
            {
                Debug.WriteLine($"gas : {gas.ReadProportion()}");
                Thread.Sleep(200);
            }
        }