Skip to content

Commit

Permalink
Updates for braking function
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectroMagus committed Jun 24, 2022
1 parent 66fdfe1 commit 5aa3398
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ The LEDC driver supports 8, 12 and 16 bit PWM resolution and can operate at a va

This library is made to simplify the use of MX1508 by allowing for the simple setup of motors and then using functions to drive them.
```
#include <ESP32MX1508.h>
Expand All @@ -43,12 +42,13 @@ void setup() {
}
void loop() {
motorA.motorGo(200); // Pass the speed to the motor: 0-255 for 8 bit resolution
delay(100);
motorA.motorStop(); // Stop no argument
delay(100);
motorA.motorRev(200); // Pass the speed to the motor: 0-255 for 8 bit resolution
delay(100);
motorA.motorGo(200); // Pass the speed to the motor: 0-255 for 8 bit resolution
delay(100);
motorA.motorStop(); // Soft Stop -no argument
delay(100);
motorA.motorRev(200); // Pass the speed to the motor: 0-255 for 8 bit resolution
delay(100);
MotorA.motorBrake(); // Hard Stop -no arguement
}
```
Expand Down
3 changes: 2 additions & 1 deletion examples/basic/basic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ void setup() {}
void loop() {
motorA.motorGo(200); // Pass the speed to the motor: 0-255 for 8 bit resolution
delay(100);
motorA.motorStop(); // Stop no argument
motorA.motorStop(); // Soft Stop -no argument
delay(100);
motorA.motorRev(200); // Pass the speed to the motor: 0-255 for 8 bit resolution
delay(100);
MotorA.motorBrake(); // Hard Stop -no arguement
}

0 comments on commit 5aa3398

Please sign in to comment.