Skip to main content

Class HBridgeMotor

Generic h-bridge motor controller.

Assembly: Meadow.Foundation.dll
View Source
public class HBridgeMotor : IDCMotor

Derived:
Meadow.Foundation.Motors.Tb67h420ftg.Motor

Implements:
Meadow.Peripherals.Motors.IDCMotor

Properties

IsNeutral

When true, the wheels spin "freely"

View Source
public bool IsNeutral { get; set; }

Power

The power applied to the motor, as a percentage between -1.0 and 1.0.

View Source
public float Power { get; set; }

PwmFrequency

The frequency of the PWM used to drive the motors. Default value is 1600.

View Source
public Frequency PwmFrequency { get; }

MotorCalibrationMultiplier

Not all motors are created equally. This number scales the Speed Input so that you can match motor speeds without changing your logic.

View Source
public float MotorCalibrationMultiplier { get; set; }

Fields

motorLeftPwm

PWM port for left motor

View Source
protected IPwmPort motorLeftPwm

motorRighPwm

PWM port for right motor

View Source
protected IPwmPort motorRighPwm

enablePort

Digital output port to enable h-bridge

View Source
protected IDigitalOutputPort enablePort

Implements

  • Meadow.Peripherals.Motors.IDCMotor