static private void TestPotentiometer() { Buzzer buzzer = new Buzzer(_goPiGo3, GrovePort.Grove1); PotentiometerSensor potentiometerSensor = new PotentiometerSensor(_goPiGo3, GrovePort.Grove2); Console.WriteLine($"Control the {buzzer.SensorName} on port {buzzer.Port} with the {potentiometerSensor.SensorName} on port {buzzer.Port}. Press enter to stop the test."); AddLines(); buzzer.Value = potentiometerSensor.Value; buzzer.Start(); while (!Console.KeyAvailable) { buzzer.Value = potentiometerSensor.Value; Thread.Sleep(100); } buzzer.Stop(); }
internal GrovePiAnalogPotentiometer(PotentiometerSensor analogSensor, string name, int sensorId, GrovePort port, bool rgbDisplay) : base(analogSensor, name, sensorId, port, rgbDisplay) { }