public ServoMotor(ServoMotorPort port, SMBusDevice controller)
 {
     _controller   = controller;
     Port          = port;
     ZeroPoint     = Angle.Zero;
     _defaultSpeed = RotationalSpeed.FromDegreesPerSecond(50);
 }
Beispiel #2
0
 public RoverRobotConfiguration(EncoderMotorPort leftMotorPort, EncoderMotorPort rightMotorPort, ServoMotorPort panMotorPort, ServoMotorPort tiltMotorPort)
 {
     LeftMotorPort  = leftMotorPort;
     RightMotorPort = rightMotorPort;
     PanMotorPort   = panMotorPort;
     TiltMotorPort  = tiltMotorPort;
 }
Beispiel #3
0
 public RoverRobotConfiguration(
     EncoderMotorPort leftMotorPort,
     EncoderMotorPort rightMotorPort,
     ServoMotorPort panMotorPort,
     ServoMotorPort tiltMotorPort,
     DigitalPort frontUltrasoundSensorPort,
     DigitalPort backUltrasoundSensorPort,
     DigitalPort frontRightLedPort,
     DigitalPort frontLeftLedPort,
     DigitalPort backRightLedPort,
     DigitalPort backLeftLedPort,
     AnaloguePort soundSensorPort,
     Color frontRightLedColor,
     Color frontLeftLedColor,
     Color backRightLedColor,
     Color backLeftLedColor)
 {
     LeftMotorPort             = leftMotorPort;
     RightMotorPort            = rightMotorPort;
     PanMotorPort              = panMotorPort;
     TiltMotorPort             = tiltMotorPort;
     FrontUltrasoundSensorPort = frontUltrasoundSensorPort;
     BackUltrasoundSensorPort  = backUltrasoundSensorPort;
     FrontRightLedPort         = frontRightLedPort;
     FrontLeftLedPort          = frontLeftLedPort;
     BackRightLedPort          = backRightLedPort;
     BackLeftLedPort           = backLeftLedPort;
     SoundSensorPort           = soundSensorPort;
     FrontRightLedColor        = frontRightLedColor;
     FrontLeftLedColor         = frontLeftLedColor;
     BackRightLedColor         = backRightLedColor;
     BackLeftLedColor          = backLeftLedColor;
 }
 public T GetOrCreateDevice <T>(ServoMotorPort motorPort) where T : ServoMotor
 {
     return(_servoMotorsFactory.GetOrCreateDevice <T>(motorPort));
 }
Beispiel #5
0
 public static ServoMotor GetOrCreateServoMotor(this IExpansionPlate plate, ServoMotorPort motorPort)
 {
     return(plate.GetOrCreateDevice <ServoMotor>(motorPort));
 }