/// <summary> /// Constructor for the DriverController object. /// </summary> /// <param name="device">Meadow device object (required to access the GPIO pins).</param> public DriveController(F7Micro device) { _enableMotors = device.CreateDigitalOutputPort(device.Pins.D04); Stop(); FrontLeftWheel = new Wheel(device.CreateDigitalOutputPort(device.Pins.D02), device.CreateDigitalOutputPort(device.Pins.D03)); FrontRightWheel = new Wheel(device.CreateDigitalOutputPort(device.Pins.D11), device.CreateDigitalOutputPort(device.Pins.D10)); RearLeftWheel = new Wheel(device.CreateDigitalOutputPort(device.Pins.A00), device.CreateDigitalOutputPort(device.Pins.A01)); RearRightWheel = new Wheel(device.CreateDigitalOutputPort(device.Pins.D13), device.CreateDigitalOutputPort(device.Pins.D14)); }
/// <summary> /// Initializes a new instance of the <see cref="OnboardLed"/> class. /// </summary> /// <param name="device">The device.</param> public OnboardLed(F7Micro device) { this.redLed = device.CreateDigitalOutputPort(device.Pins.OnboardLedRed, initialState: false); this.blueLed = device.CreateDigitalOutputPort(device.Pins.OnboardLedBlue, initialState: false); this.greenLed = device.CreateDigitalOutputPort(device.Pins.OnboardLedGreen, initialState: false); }