public static Led GetOrCreateLed(this IFoundationPlate plate, DigitalPort port, Color displayColor) { var led = plate.GetOrCreateDevice <Led>(port); var p = displayColor.ToPixel <Argb32>(); var alpha = p.A / 255.0; led.DisplayProperties.Add(new RgbaCssColor(p.R, p.G, p.B, alpha)); return(led); }
public static Led GetOrCreateLed(this IFoundationPlate plate, DigitalPort port) { return(plate.GetOrCreateDevice <Led>(port)); }
public static UltrasonicSensor GetOrCreateUltrasonicSensor(this IFoundationPlate plate, DigitalPort port) { return(plate.GetOrCreateDevice <UltrasonicSensor>(port)); }
public static Buzzer GetOrCreateBuzzer(this IFoundationPlate plate, DigitalPort port) { return(plate.GetOrCreateDevice <Buzzer>(port)); }
public static Potentiometer GetOrCreatePotentiometer(this IFoundationPlate plate, AnaloguePort port) { return(plate.GetOrCreateDevice <Potentiometer>(port)); }
public static LightSensor GetOrCreateLightSensor(this IFoundationPlate plate, AnaloguePort port) { return(plate.GetOrCreateDevice <LightSensor>(port)); }