void ToggleMarqueeLights() { if (nusbioPixel == null) { return; } _logger.LogVerbose("In ToggleMarqueeLights()"); //initial starting brightness is 128? nusbioPixel.SetBrightness(64 * 2); _logger.LogVerbose("_whiteStripPWMIntensity: " + _whiteStripPWMIntensity.ToString()); if (_whiteStripPWMIntensity < 255) { var r = nusbioPixel.AnalogWrite(Mcu.GpioPwmPin.Gpio5, _whiteStripPWMIntensity); } }
private void NoActivityDetected() { //if (this.InvokeRequired) //{ // NoActivityDetectedDelegate del = new NoActivityDetectedDelegate(NoActivityDetected); // object[] parameters = { }; // this.Invoke(del); //} //else //{ if (_cabinetLights == CabinetLights.On && _lastMotionDetectedTime < DateTime.Now.AddSeconds(-1 * MOTIONTIMEOUT)) { this.Opacity = 0; nusbioPixel?.AnalogWrite(Mcu.GpioPwmPin.Gpio5, 0); nusbioPixel?.SetStrip(Color.Beige, 20); _logger.LogInfo($"Turn Arcade Machine Off at {DateTime.Now}. _lastMotionDetectedTime: {_lastMotionDetectedTime}"); _cabinetLights = CabinetLights.Off; _logger.LogVerbose("Cabinet lights were toggled off."); } //} }