mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-05-20 19:41:47 +02:00
Update power measurement examples
Update power measurement examples to the state in which they were used as test cases in thesis
This commit is contained in:
parent
d042c2a437
commit
eb4859c31d
@ -3,7 +3,7 @@
|
||||
Dezibot dezibot = Dezibot();
|
||||
|
||||
// How many times to run a command on the display consecutively;
|
||||
const uint16_t iterations = 5000;
|
||||
const uint16_t iterations = 1000;
|
||||
|
||||
void setup() {
|
||||
dezibot.begin();
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Dezibot dezibot;
|
||||
|
||||
const uint16_t cycleTime = 2e4; //20000 ms = 20 s
|
||||
const uint16_t cycleTime = 20e3;
|
||||
|
||||
esp_pm_lock_handle_t cpuFreqLock;
|
||||
esp_pm_lock_handle_t apbFreqLock;
|
||||
|
@ -14,8 +14,7 @@ void loop() {
|
||||
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);
|
||||
dezibot.motion.move();
|
||||
delay(20000);
|
||||
dezibot.motion.stop();
|
||||
delay(20000);
|
||||
|
@ -4,29 +4,28 @@
|
||||
Dezibot dezibot = Dezibot();
|
||||
|
||||
void setup() {
|
||||
Serial.begin(112500);
|
||||
while (!Serial) {
|
||||
; /* Wait for USB-CDC Serial init to complete. */
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dezibot.display.begin();
|
||||
dezibot.display.println("Debug enabled.");
|
||||
Serial.begin(112500);
|
||||
Serial.println("Debug enabled.");
|
||||
#endif
|
||||
dezibot.communication.begin();
|
||||
dezibot.communication.setGroupNumber(1);
|
||||
dezibot.communication.sendMessage("Repeated send power consumption test commencing");
|
||||
#ifdef DEBUG
|
||||
dezibot.display.println("Mesh set up");
|
||||
Serial.println("Mesh set up");
|
||||
/* Set up receive handler */
|
||||
dezibot.communication.onReceive(handle_receive);
|
||||
dezibot.display.println("Set up receive. Printing incoming messages:");
|
||||
Serial.println("Set up receive. Printing incoming messages:");
|
||||
Serial.println("Sending broadcast messages to generate TX power consumption:");
|
||||
#endif
|
||||
delay(5000);
|
||||
#ifdef DEBUG
|
||||
Serial.println("Starting Transmission...");
|
||||
#endif
|
||||
}
|
||||
|
||||
void handle_receive(String &message) {
|
||||
dezibot.display.println(message);
|
||||
Serial.println(message);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user