RoboidControl for Arduino
Loading...
Searching...
No Matches
Motor.h
Go to the documentation of this file.
1#pragma once
2
3#include <time.h>
4#include "Thing.h"
5
6namespace Passer {
7namespace RoboidControl {
8
11class Motor : public Thing {
12 public:
14 Motor();
15
17 enum class Direction { Clockwise = 1, CounterClockwise = -1 };
20
24 virtual void SetSpeed(float speed);
28 virtual float GetSpeed();
29
30 protected:
32};
33
34} // namespace RoboidControl
35} // namespace Passer
36using namespace Passer::RoboidControl;
A Motor is a Thing which can move parts of the Roboid.
Definition Motor.h:11
virtual float GetSpeed()
Get the current target speed of the motor.
Definition Motor.cpp:8
Direction
Motor turning direction.
Definition Motor.h:17
float currentTargetSpeed
Definition Motor.h:31
Direction direction
The forward turning direction of the motor.
Definition Motor.h:19
Motor()
Default constructor for the Motor.
Definition Motor.cpp:4
virtual void SetSpeed(float speed)
Set the target motor speed.
Definition Motor.cpp:12
A thing is a functional component on a robot.
Definition Thing.h:7
Definition DRV8833.h:7
Definition DRV8833.h:6