private void TouchSensor2UpdateHandler(touchsensor.TouchSensorUpdate sensorReadings) { if (sensorReadings.Body.TouchSensorOn) { RotateMotor(Direction.Stop); } }
private void touchSensorHandler(touchsensor.TouchSensorUpdate notification) { if (notification.Body.TouchSensorOn) // Touch sensor pressed down { Console.WriteLine("Blue: {0}, Green: {1}, Red: {2}, NUM: {3}, CurrColor: {4}", currentBlueIntensity, currentGreenIntensity, currentRedIntensity, currentColorNumber, currentColor); } }