public static void Init(GTM.Display_HD44780 display) { version = "v 1.0"; sensorVoltage = 4.80D; mvpermm = sensorVoltage / 512D; Service.display = display; if (extender == null) { extender = new GTM.Extender(3); } if (sensors == null) { sensors = new AnalogInput[3]; } if (sensors[0] == null) sensors[0] = extender.SetupAnalogInput(GT.Socket.Pin.Three); if (sensors[1] == null) sensors[1] = extender.SetupAnalogInput(GT.Socket.Pin.Four); if (sensors[2] == null) sensors[2] = extender.SetupAnalogInput(GT.Socket.Pin.Five); sensorMedians = new ArrayList(); maxSensorIterations = 4; // must be div by 2 if (sensorTimer == null) { sensorTimer = new GT.Timer(500); sensorTimer.Tick += new GT.Timer.TickEventHandler(sensorTimer_Tick); } if (firstTimeTimer == null) { firstTimeTimer = new GT.Timer(500); firstTimeTimer.Tick += new GT.Timer.TickEventHandler(firstTimeTimer_Tick); } if (modem == null) { modem = new Sim900Modem(2, display); } Utilities.DisplayOnLine1(String.Concat("ozlo, llc ", version), display); }
public static void Init(GTM.GHIElectronics.Display_HD44780 display) { version = "1.0"; sensorVoltage = 4.80D; mvpermm = sensorVoltage / 512D; if (display_HD44780 == null) { display_HD44780 = display; } if (extender == null) { extender = new GTM.GHIElectronics.Extender(3); } if (sensors == null) { sensors = new AnalogInput[3]; } if (sensors[0] == null) sensors[0] = extender.SetupAnalogInput(GT.Socket.Pin.Three); if (sensors[1] == null) sensors[1] = extender.SetupAnalogInput(GT.Socket.Pin.Four); if (sensors[2] == null) sensors[2] = extender.SetupAnalogInput(GT.Socket.Pin.Five); if (sensorTimer == null) { sensorTimer = new GT.Timer(500); sensorTimer.Tick += new GT.Timer.TickEventHandler(sensorTimer_Tick); } if (modem == null) { modem = new Sim900Modem(2); } Display("ozlo, llc " + version, ""); }