C# 클래스 BrickPi.Movement.Vehicule

파일 보기 프로젝트 열기: Ellerbach/BrickPi 1 사용 예제들

공개 메소드들

메소드 설명
Backward ( int speed ) : void

Run backward at the specified speed

Backward ( int speed, int timeout ) : void

Run backward for the specified number of milliseconds

Foreward ( int speed, int timeout ) : void

Run forward for the specified number of milliseconds

Forward ( int speed ) : void

Run forward at the specified speed

IsRunning ( ) : bool

Return true if the vehicule is moving

Stop ( ) : void

Stop the vehicule

TrunLeftTime ( int speed, int timeout ) : void

Turn the vehicule left for a number of milliseconds

TrunRightTime ( int speed, int timeout ) : void

Turn the vehicule right for a number of milliseconds

TurnLeft ( int speed, int degrees ) : void

Turn the vehicule left by the specified number of degrees for each motor. So 360 will do 1 motor turn. You need to do some math to have the actual vehicule turning fully at 360. It depends of the reduction used.

TurnRight ( int speed, int degrees ) : void

Turn the vehicule right by the specified number of degrees for each motor. So 360 will do 1 motor turn. You need to do some math to have the actual vehicule turning fully at 360. It depends of the reduction used.

Vehicule ( BrickPortMotor left, BrickPortMotor right ) : System

Create a vehicule with 2 motors, one left and one right

비공개 메소드들

메소드 설명
IsRunning ( BrickPortMotor port ) : bool
RunMotorSyncDegrees ( BrickPortMotor ports, int speeds, int degrees ) : Task
RunMotorSyncTime ( BrickPortMotor ports, int speeds, int timeout ) : Task
RunUntil ( object state ) : void
StartMotor ( int port, int speed ) : void
StopMotor ( int port ) : void

메소드 상세

Backward() 공개 메소드

Run backward at the specified speed
public Backward ( int speed ) : void
speed int speed is between -255 and +255
리턴 void

Backward() 공개 메소드

Run backward for the specified number of milliseconds
public Backward ( int speed, int timeout ) : void
speed int speed is between -255 and +255
timeout int >number of milliseconds to run the motors
리턴 void

Foreward() 공개 메소드

Run forward for the specified number of milliseconds
public Foreward ( int speed, int timeout ) : void
speed int speed is between -255 and +255
timeout int >number of milliseconds to run the motors
리턴 void

Forward() 공개 메소드

Run forward at the specified speed
public Forward ( int speed ) : void
speed int speed is between -255 and +255
리턴 void

IsRunning() 공개 메소드

Return true if the vehicule is moving
public IsRunning ( ) : bool
리턴 bool

Stop() 공개 메소드

Stop the vehicule
public Stop ( ) : void
리턴 void

TrunLeftTime() 공개 메소드

Turn the vehicule left for a number of milliseconds
public TrunLeftTime ( int speed, int timeout ) : void
speed int speed is between -255 and +255
timeout int number of milliseconds to run the motors
리턴 void

TrunRightTime() 공개 메소드

Turn the vehicule right for a number of milliseconds
public TrunRightTime ( int speed, int timeout ) : void
speed int speed is between -255 and +255
timeout int number of milliseconds to run the motors
리턴 void

TurnLeft() 공개 메소드

Turn the vehicule left by the specified number of degrees for each motor. So 360 will do 1 motor turn. You need to do some math to have the actual vehicule turning fully at 360. It depends of the reduction used.
public TurnLeft ( int speed, int degrees ) : void
speed int speed is between -255 and +255
degrees int degrees to turn each motor
리턴 void

TurnRight() 공개 메소드

Turn the vehicule right by the specified number of degrees for each motor. So 360 will do 1 motor turn. You need to do some math to have the actual vehicule turning fully at 360. It depends of the reduction used.
public TurnRight ( int speed, int degrees ) : void
speed int speed is between -255 and +255
degrees int degrees to turn each motor
리턴 void

Vehicule() 공개 메소드

Create a vehicule with 2 motors, one left and one right
public Vehicule ( BrickPortMotor left, BrickPortMotor right ) : System
left BrickPortMotor Motor port for left motor
right BrickPortMotor Motor port for right motor
리턴 System