/// <summary> /// Create and start a light senor /// </summary> /// <param name="pin">From the SecretLabs.NETMF.Hardware.NetduinoPlus.Pins namespace</param> /// <param name="SampleRateMilliseconds">How often to measure in milliseconds or -1 to disable auto timed sensor readings</param> /// <param name="name">Unique identifying name for command and control</param> public SensorDistance(Cpu.Pin echo, Cpu.Pin trigger, int SampleRateMilliseconds, string name) : base("ultrasonic", "p", ValuesPerSample.One, SampleRateMilliseconds, name) { sensor = new Drivers.HCSR04(echo, trigger); StartMeasuring(); }