コード例 #1
0
 private void TouchSensor2UpdateHandler(touchsensor.TouchSensorUpdate sensorReadings)
 {
     if (sensorReadings.Body.TouchSensorOn)
     {
         RotateMotor(Direction.Stop);
     }
 }
コード例 #2
0
ファイル: Lab4_201_09.cs プロジェクト: clpun/waterloo-labs
 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);
     }
 }