RBE1001Lib
examples
EncoderTest
EncoderTest.ino
Go to the documentation of this file.
1
#include <
RBE1001Lib.h
>
2
3
LeftMotor
left_motor
;
4
RightMotor
right_motor
;
5
6
/*
7
* This is the standard setup function that is called when the ESP32 is rebooted
8
* It is used to initialize anything that needs to be done once.
9
*/
10
void
setup
()
11
{
12
// This will initialize the Serial as 115200 for prints
13
Serial.begin(115200);
14
}
15
16
/*
17
* The main loop for the program. The loop function is repeatedly called
18
* once the ESP32 is started.
19
*/
20
void
loop
()
21
{
22
Serial.print(
"L: "
);
23
Serial.print(left_motor.
getCurrentDegrees
());
24
Serial.print(
'\t'
);
25
26
Serial.print(
"R: "
);
27
Serial.print(right_motor.
getCurrentDegrees
());
28
Serial.print(
'\n'
);
29
30
delay(100);
31
}
left_motor
LeftMotor left_motor
Definition:
EncoderTest.ino:3
LeftMotor
Definition:
RBE1001Lib.h:67
RightMotor
Definition:
RBE1001Lib.h:73
RBE1001Lib.h
Motor::getCurrentDegrees
float getCurrentDegrees()
Definition:
Motor.cpp:568
loop
void loop()
Definition:
EncoderTest.ino:20
right_motor
RightMotor right_motor
Definition:
EncoderTest.ino:4
setup
void setup()
Definition:
EncoderTest.ino:10
Generated by
1.8.13