RBE1001Lib
EncoderTest.ino
Go to the documentation of this file.
1 #include <RBE1001Lib.h>
2 
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 }
LeftMotor left_motor
Definition: EncoderTest.ino:3
float getCurrentDegrees()
Definition: Motor.cpp:568
void loop()
Definition: EncoderTest.ino:20
RightMotor right_motor
Definition: EncoderTest.ino:4
void setup()
Definition: EncoderTest.ino:10