Edit

Share via


Motor Class

Definition

Represents GoPiGo3 motor

public class Motor
type Motor = class
Public Class Motor
Inheritance
Motor

Constructors

Motor(GoPiGo, MotorPort, Int32)

Create a motor

Motor(GoPiGo, MotorPort)

Create a motor

Properties

PeriodRefresh

Period to refresh the notification of property changed in milliseconds

Port

Motor port

Speed

Set or read the speed of the motor speed is between -255 and +255

TachoCount

Tacho count as a property, events are rasied when value is changing

Methods

GetSpeed()

Get the speed

GetTachoCount()

Gets the tacho count

SetPolarity(Polarity)

Change the polatity of the motor

SetSpeed(Int32)

Set the speed of the motor

SetTachoCount(Int32)

Set Tachometer encoder offset Use this to reset or setup a specific position

Start()

Start the motor

Start(Int32)

Start with the specified speed

Stop()

Stop the Motor

UpdateSensor(Object)

Update the sensor and this will raised an event on the interface

Applies to