merge into Back_to_Origin

This commit is contained in:
Prof.J.Wagner 2024-06-06 13:57:16 +02:00
parent a5f8af6d3c
commit 4d62e30cc6
2 changed files with 2613 additions and 0 deletions

View File

@ -0,0 +1,34 @@
#include "Dezibot.h"
Dezibot dezibot = Dezibot();
void setup() {
// put your setup code here, to run once:
dezibot.begin();
Serial.begin(115200);
Serial.println("AAA");
}
//https://esp32cube.com/basis/032_millis/
int indices = 0;
void loop() {
// put your main code here, to run repeatedly:
int zvalue = 0;
for(int i = 0; i<30;i++){
zvalue += dezibot.motionDetection.getAcceleration().z;
}
zvalue = zvalue/30;
if(zvalue < -1700){
dezibot.multiColorLight.setLed(ALL,0x004000);
Serial.println("AAA");
} else if(zvalue > 1700){
dezibot.multiColorLight.setLed(ALL,0x400000);
} else {
dezibot.multiColorLight.turnOffLed();
}
}

2579
src/dezibot Normal file

File diff suppressed because it is too large Load Diff