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:
2025-01-28 20:22:38 +01:00
parent d042c2a437
commit eb4859c31d
4 changed files with 12 additions and 14 deletions

View File

@ -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() {