mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-05 02:01:42 +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:
@ -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() {
|
||||
|
Reference in New Issue
Block a user