mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-04 17:51:41 +02:00
Add existing code: Power consumption test cases and Semaphore power scheduler skeleton
This commit is contained in:
23
example/advanced/Power_Measurements/IR_LED/IR_LED.ino
Normal file
23
example/advanced/Power_Measurements/IR_LED/IR_LED.ino
Normal file
@ -0,0 +1,23 @@
|
||||
#include "Dezibot.h"
|
||||
|
||||
Dezibot dezibot;
|
||||
|
||||
const uint16_t cycleMillis = 2e4;
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
dezibot.infraredLight.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
// Just turn the lights on alternating each five seconds, to get the consumption
|
||||
dezibot.infraredLight.front.turnOn();
|
||||
delay(cycleMillis);
|
||||
dezibot.infraredLight.front.turnOff();
|
||||
dezibot.infraredLight.bottom.turnOn();
|
||||
delay(cycleMillis);
|
||||
//Turn off and wait a little to measure baseline consumption
|
||||
dezibot.infraredLight.bottom.turnOff();
|
||||
delay(cycleMillis);
|
||||
}
|
Reference in New Issue
Block a user