public LightSensor(Cpu.Pin pin) { // Open the analog port lightSensor = new SecretLabs.NETMF.Hardware.AnalogInput(pin); // Set the value range between 0 and 100 lightSensor.SetRange(minValue, maxValue); }
/// <summary> /// Create a new base instance of the temperature sensor. /// </summary> /// <param name="pin">Pin the sensor's vout is connected to. public TMP36(Cpu.Pin pin) { // http://www.analog.com/en/temperature-sensing-and-thermal-management/digital-temperature-sensors/tmp36/products/product.html MaximumTemperatureCapability = 125; MinimumTemperatureCapability = -40; RequiredVoltage = 2.7f; sensor = new SecretLabs.NETMF.Hardware.AnalogInput(pin); sensor.SetRange(0, 3300); }
public Devices(Cpu.Pin jogXPin, Cpu.Pin jogYPin, Cpu.Pin jogZPin) { if (jogXPin != Cpu.Pin.GPIO_NONE) { JogXPort = new SecretLabs.NETMF.Hardware.AnalogInput(jogXPin); JogXPort.SetRange(-50, 50); } if (jogYPin != Cpu.Pin.GPIO_NONE) { JogYPort = new SecretLabs.NETMF.Hardware.AnalogInput(jogYPin); JogYPort.SetRange(-50, 50); } if (jogZPin != Cpu.Pin.GPIO_NONE) { JogZPort = new SecretLabs.NETMF.Hardware.AnalogInput(jogZPin); JogZPort.SetRange(-50, 50); } }