blob: b7cc7f1c719645116e12fe7821c3c494e70dc99f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <Arduino.h>
#include "settings.h"
#pragma once
class MOTORS
{
public:
MOTORS();
void init();
void forward(int speed, int duration = 0);
void backward(int speed, int duration = 0);
void leftForward(int speed, int duration = 0);
void leftBackward(int speed, int duration = 0);
void rightForward(int speed, int duration = 0);
void rightBackward(int speed, int duration = 0);
void leftTurn(int speed, int duration = 0);
void rightTurn(int speed, int duration = 0);
void leftStop();
void rightStop();
void stop();
private:
int scaleSpeed(int speed);
};
|