Add existing code: Power consumption test cases and Semaphore power scheduler skeleton
This commit is contained in:
1 parent
87b9fbe66f
commit
e4dffe50c7
13 files changed
+522
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#include "Dezibot.h"
|
||||
|
||||
Dezibot dezibot;
|
||||
|
||||
const uint duty = 8192; //Full tilt
|
||||
|
||||
void setup() {
|
||||
dezibot.motion.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Alternatingly turn on the Motors. Use the commands provided by motion for this, using the provided
|
||||
// functions (with their duty cycle), as it represents typical usage
|
||||
dezibot.motion.rotateClockwise(0,duty);
|
||||
delay(20000);
|
||||
dezibot.motion.rotateAntiClockwise(0,duty);
|
||||
delay(20000);
|
||||
// Turn on both motors at the same time
|
||||
dezibot.motion.left.setSpeed(duty);
|
||||
dezibot.motion.right.setSpeed(duty);
|
||||
delay(20000);
|
||||
dezibot.motion.stop();
|
||||
delay(20000);
|
||||
}
|
||||
Reference in new issue
Block a user