Update Measurement sketches

This commit is contained in:
2025-02-03 20:58:00 +01:00
parent b57e955dc2
commit 9acca9e5c7
4 changed files with 109 additions and 5 deletions

View File

@ -3,7 +3,7 @@
Dezibot dezibot;
void setup() {
dezibot.lightDetection.begin();
dezibot.colorDetection.begin();
//dezibot.motion.detection.end();
// put your setup code here, to run once:
Serial.begin(115200);
@ -13,7 +13,7 @@ void setup() {
}
delay(1000);
// Test if VEML6040 is working correctly
char light_value = dezibot.lightDetection.getValue(DL_FRONT);
char light_value = dezibot.colorDetection.getColorValue(VEML_WHITE);
if (light_value != UINT16_MAX) {
Serial.printf("Light detection seems to be working (detected value: %d). Starting measurements...\r\n", light_value);
} else {
@ -29,6 +29,6 @@ void setup() {
void loop() {
// put your main code here, to run repeatedly:
dezibot.lightDetection.getValue(DL_FRONT);
dezibot.colorDetection.getColorValue(VEML_WHITE);
delay(10);
}