Smartcar Shield
Loading...
Searching...
No Matches
src
motor
dual
DualMotor.hpp
Go to the documentation of this file.
1
8
#pragma once
9
10
#include <stdint.h>
// NOLINT(modernize-deprecated-headers)
11
12
#include "../Motor.hpp"
13
14
class
DualMotor
:
public
Motor
15
{
16
public
:
24
DualMotor
(
Motor
& motor1,
Motor
& motor2);
25
26
/* Check `Motor` interface for documentation */
27
void
setSpeed
(
int
speed)
override
;
28
29
private
:
30
Motor
& mMotor1;
31
Motor
& mMotor2;
32
};
DualMotor
A set of two motors that should always spin in the same way while being controlled by different pins.
Definition
DualMotor.hpp:15
DualMotor::setSpeed
void setSpeed(int speed) override
Sets the motor speed and direction as the percentage of the maximum possible speed,...
Definition
DualMotor.cpp:9
Motor
Interface programmatically representing any kind of motor.
Definition
Motor.hpp:23
Generated by
1.9.8