public void ConnectToSpecificDevice() { var serialNumber = "0x1A002944"; var device = Blink1Connector.Connect(serialNumber); Assert.NotNull(device); }
public static void TurnOff() { var connected = Blink1Connector.Scan(); foreach (Blink1 blink in connected.ToArray()) { blink.TurnOff(); } }
public static void SetBlinkColor(Color color) { var connected = Blink1Connector.Scan(); foreach (Blink1 blink in connected.ToArray()) { blink.Set(color); } }
public Blink1Controller() { var blink1 = Blink1Connector.Scan()?.FirstOrDefault(); if (blink1 == null) { throw new InvalidOperationException("No Blink(1) device connected."); } Blink1 = (Blink1)blink1; }
public void ScanWithNoDevicesFindsNone() { var devices = Blink1Connector.Scan(); Assert.Empty(devices); }
public void ScanFindsDevices() { var devices = Blink1Connector.Scan(); Assert.NotEmpty(devices); }
public Blink1Mk2Fixture() { blink1 = Blink1Connector.Scan().FirstOrDefault(b => (b is IBlink1Mk2)) as IBlink1Mk2; }