public ServoMotor(ServoMotorPort port, SMBusDevice controller) { _controller = controller; Port = port; ZeroPoint = Angle.Zero; _defaultSpeed = RotationalSpeed.FromDegreesPerSecond(50); }
public RoverRobotConfiguration(EncoderMotorPort leftMotorPort, EncoderMotorPort rightMotorPort, ServoMotorPort panMotorPort, ServoMotorPort tiltMotorPort) { LeftMotorPort = leftMotorPort; RightMotorPort = rightMotorPort; PanMotorPort = panMotorPort; TiltMotorPort = tiltMotorPort; }
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)); }
public static ServoMotor GetOrCreateServoMotor(this IExpansionPlate plate, ServoMotorPort motorPort) { return(plate.GetOrCreateDevice <ServoMotor>(motorPort)); }