RBE1001Lib
src
RBE1001Lib.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
Esp32WifiManager.h
>
4
#include <WebServer.h>
5
#include <ESPmDNS.h>
6
#include <
ESP32AnalogRead.h
>
7
8
#include "
Rangefinder.h
"
9
#include "
Motor.h
"
10
11
// Pins used by a perpheral, may be re-used
12
#define BOOT_FLAG_PIN 0
13
#define I2C_SDA 21
14
#define I2C_SCL 22
15
#define SERIAL_PROGRAMMING_TX 1
16
#define SERIAL_PROGRAMMING_RX 3
17
18
#define SPI_MOSI 23
19
#define SPI_MISO 19
20
#define SPI_SCK 18
21
#define SPI_SS 5
22
23
// Ultrasonics
24
#define SIDE_ULTRASONIC_TRIG 16
25
#define SIDE_ULTRASONIC_ECHO 17
26
27
//A4
28
#define LEFT_LINE_SENSE 36
29
//A3
30
#define RIGHT_LINE_SENSE 39
31
//A2
32
#define SERVO_FEEDBACK_SENSOR 34
33
36
#define SERVO_PIN 33
37
38
#define MOTOR_DISABLE 15
39
43
#define MOTOR_LEFT_PWM 13
44
47
//A5
48
#define MOTOR_LEFT_DIR 4
49
52
#define MOTOR_RIGHT_PWM 12
53
56
//A1
57
#define MOTOR_RIGHT_DIR 25
58
//Encoder pins
59
60
#define MOTOR_LEFT_ENCA 27
61
//A0
62
#define MOTOR_LEFT_ENCB 26
63
64
#define MOTOR_RIGHT_ENCA 32
65
#define MOTOR_RIGHT_ENCB 14
66
67
class
LeftMotor
:
public
Motor
68
{
69
public
:
70
LeftMotor
() :
Motor
{
MOTOR_LEFT_PWM
,
MOTOR_LEFT_DIR
,
MOTOR_LEFT_ENCA
,
MOTOR_LEFT_ENCB
} {}
71
};
72
73
class
RightMotor
:
public
Motor
74
{
75
public
:
76
RightMotor
() :
Motor
{
MOTOR_RIGHT_PWM
,
MOTOR_RIGHT_DIR
,
MOTOR_RIGHT_ENCA
,
MOTOR_RIGHT_ENCB
} {}
77
};
MOTOR_LEFT_DIR
#define MOTOR_LEFT_DIR
Definition:
RBE1001Lib.h:48
MOTOR_LEFT_PWM
#define MOTOR_LEFT_PWM
Definition:
RBE1001Lib.h:43
MOTOR_RIGHT_ENCA
#define MOTOR_RIGHT_ENCA
Definition:
RBE1001Lib.h:64
RightMotor::RightMotor
RightMotor()
Definition:
RBE1001Lib.h:76
LeftMotor
Definition:
RBE1001Lib.h:67
Esp32WifiManager.h
Motor.h
RightMotor
Definition:
RBE1001Lib.h:73
LeftMotor::LeftMotor
LeftMotor()
Definition:
RBE1001Lib.h:70
MOTOR_RIGHT_PWM
#define MOTOR_RIGHT_PWM
Definition:
RBE1001Lib.h:52
MOTOR_LEFT_ENCB
#define MOTOR_LEFT_ENCB
Definition:
RBE1001Lib.h:62
MOTOR_LEFT_ENCA
#define MOTOR_LEFT_ENCA
Definition:
RBE1001Lib.h:60
Motor
A PID Motor class using FreeRTOS threads, ESP32Encoder and ESP32PWM.
Definition:
Motor.h:43
MOTOR_RIGHT_ENCB
#define MOTOR_RIGHT_ENCB
Definition:
RBE1001Lib.h:65
ESP32AnalogRead.h
Rangefinder.h
MOTOR_RIGHT_DIR
#define MOTOR_RIGHT_DIR
Definition:
RBE1001Lib.h:57
Generated by
1.8.13