Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BrickMotor"/> class.
 /// </summary>
 /// <param name="brickPiRaw"> The raw BrickPi communication object. </param>
 /// <param name="motorIndex"> The motor index. </param>
 public BrickMotor(IBrickPiRaw brickPiRaw, MotorIndex motorIndex)
 {
     this.brickPiRaw = brickPiRaw;
     this.motorIndex = motorIndex.ToInt();
     this.brickPiRaw.MotorEnable[this.motorIndex] = 1;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BrickPi"/> class.
 /// </summary>
 /// <param name="brickPi"> The raw communication class. </param>
 public BrickPi(IBrickPiRaw brickPi)
 {
     this.brickPi = brickPi;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BrickSensor"/> class.
 /// </summary>
 /// <param name="brickPiRaw">
 /// The brick pi raw.
 /// </param>
 /// <param name="sensorIndex">
 /// The sensor index.
 /// </param>
 internal BrickSensor(IBrickPiRaw brickPiRaw, SensorIndex sensorIndex)
 {
     this.BrickPiRaw  = brickPiRaw;
     this.sensorIndex = sensorIndex;
 }