mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-05 18:14:31 +02:00
Add existing code: Power consumption test cases and Semaphore power scheduler skeleton
This commit is contained in:
22
example/advanced/Power_Measurements/Motors/Motors.ino
Normal file
22
example/advanced/Power_Measurements/Motors/Motors.ino
Normal file
@ -0,0 +1,22 @@
|
||||
#include "Dezibot.h"
|
||||
|
||||
Dezibot dezibot;
|
||||
|
||||
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();
|
||||
delay(20000);
|
||||
dezibot.motion.rotateAntiClockwise();
|
||||
delay(20000);
|
||||
// Turn on both motors at the same time
|
||||
dezibot.motion.left.setSpeed(DEFAULT_BASE_VALUE);
|
||||
dezibot.motion.right.setSpeed(DEFAULT_BASE_VALUE);
|
||||
delay(20000);
|
||||
dezibot.motion.stop();
|
||||
delay(20000);
|
||||
}
|
Reference in New Issue
Block a user