public Lighting(Extender extender, GT.Socket.Pin pin, int frequency, float lowLightDutyCycle, float overheadDutyCycle, float nightDutyCycle) { this.extender = extender; this.frequency = frequency; this.lowLight = lowLightDutyCycle; this.overhead = overheadDutyCycle; this.night = nightDutyCycle; //asign the pin for pwm PwmOutput pwm = extender.CreatePwmOutput(pin); //thread that loops changing the light output per time of day Thread thread = new Thread(() => PwmThread(pwm)); thread.Start(); }