Vehicle Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents BrickPi Vehicle
public sealed class Vehicle
type Vehicle = class
Public NotInheritable Class Vehicle
- Inheritance
-
Vehicle
Constructors
Vehicle(Brick, BrickPortMotor, BrickPortMotor) |
Create a vehicule with 2 motors, one left and one right |
Properties
DirectionOpposite |
Is the vehicule has inverted direction, then true |
PortLeft |
Return the BrickPortMotor of the left motor |
PortRight |
Return the BrickPortMotor of the right motor |
Methods
Backward(Int32) |
Run backward at the specified speed |
Backward(Int32, Int32) |
Run backward for the specified number of milliseconds |
Foreward(Int32, Int32) |
Run forward for the specified number of milliseconds |
Forward(Int32) |
Run forward at the specified speed |
IsRunning() |
Return true if the vehicule is moving |
Stop() |
Stop the vehicule |
TrunLeftTime(Int32, Int32) |
Turn the vehicule left for a number of milliseconds |
TrunRightTime(Int32, Int32) |
Turn the vehicule right for a number of milliseconds |
TurnLeft(Int32, Int32) |
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(Int32, Int32) |
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. |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for