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 GoPiGo3 vehicle
public class Vehicle
type Vehicle = class
Public Class Vehicle
- Inheritance
-
Vehicle
Constructors
Vehicle(GoPiGo) |
Create a vehicle with 2 motors, one left and one right |
Properties
DirectionOpposite |
Is the vehicle has inverted direction, then true |
PortLeft |
Return the MotorPort of the left motor |
PortRight |
Return the MotorPort of the right motor |
Methods
Backward(Int32, Int32) |
Run backward for the specified number of milliseconds |
Backward(Int32) |
Run backward at the specified speed |
Forward(Int32, Int32) |
Run forward for the specified number of milliseconds |
Forward(Int32) |
Run forward at the specified speed |
IsRunning() |
Return true if the vehicle is moving |
Stop() |
Stop the vehicle |
TrunLeftTime(Int32, Int32) |
Turn the vehicle left for a number of milliseconds |
TrunRightTime(Int32, Int32) |
Turn the vehicle right for a number of milliseconds |
TurnLeft(Int32, Int32) |
Turn the vehicle 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 vehicle turning fully at 360. It depends of the reduction used. |
TurnRight(Int32, Int32) |
Turn the vehicle 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 vehicle turning fully at 360. It depends of the reduction used. |