This commit is contained in:
mulbric1
2024-06-04 10:22:35 +00:00
parent 60175861db
commit 5bd1eee633
23 changed files with 1213 additions and 18 deletions

View File

@ -0,0 +1,20 @@
#include "Dezibot.h"
Dezibot dezibot;
void setup() {
dezibot.begin();
dezibot.motionDetection.begin();
//dezibot.motionDetection.end();
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
//Serial.println(dezibot.motionDetection.getTemperature());
Serial.println(dezibot.motionDetection.getAcceleration().z);
//Serial.println(dezibot.motionDetection.getRotation().x);
Serial.println(dezibot.motionDetection.getWhoAmI());
delay(5000);
}

View File

@ -0,0 +1,27 @@
#include "Dezibot.h"
Dezibot dezibot = Dezibot();
void setup() {
// put your setup code here, to run once:
dezibot.begin();
Serial.begin(115200);
}
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,0x00FF00);
} else if(zvalue > 1700){
dezibot.multiColorLight.setLed(ALL,0xFF0000);
} else {
dezibot.multiColorLight.turnOffLed();
}
}

View File

@ -0,0 +1,26 @@
#include "Dezibot.h"
Dezibot dezibot = Dezibot();
void setup() {
// put your setup code here, to run once:
dezibot.begin();
}
void loop() {
// put your main code here, to run repeatedly:
for (int d = 0; d < 255; d++) {
dezibot.multiColorLight.setLed(ALL,dezibot.multiColorLight.color(d,0,255-d));
delay(2);
}
for (int d = 0; d < 255; d++) {
dezibot.multiColorLight.setLed(ALL, dezibot.multiColorLight.color(255-d, d, 0));
delay(2);
}
for (int d = 0; d < 255; d++) {
dezibot.multiColorLight.setLed(ALL, dezibot.multiColorLight.color(0, 255-d, d));
delay(2);
}
}

View File

@ -0,0 +1,21 @@
/****************************************************
* If you have selected ESP32-S3-USB_OTG as the board,
* change Tools->USB_Mode to "Hardware CDC and JTAG".
*****************************************************/
#include <Dezibot.h>
Dezibot dezibot = Dezibot();
void setup() {
Serial.begin(115200);
Serial.println("Started");
dezibot.begin();
Serial.println("Inited");
}
void loop() {
Serial.println(dezibot.lightDetection.getValue(DL_FRONT));
delay(1000);
}

View File

@ -0,0 +1,18 @@
#include <Dezibot.h>
Dezibot dezibot = Dezibot();
void setup() {
dezibot.begin();
}
void loop() {
dezibot.motion.move(1000);
dezibot.multiColorLight.setLed(BOTTOM, RED);
delay(2000);
dezibot.motion.rotateAntiClockwise(1000);
dezibot.multiColorLight.setLed(BOTTOM, GREEN);
delay(2000);
dezibot.motion.rotateClockwise(1000);
dezibot.multiColorLight.setLed(BOTTOM, BLUE);
delay(2000);
dezibot.multiColorLight.turnOffLed();
delay(2000);
}

View File

@ -0,0 +1,18 @@
#include <Dezibot.h>
Dezibot dezibot = Dezibot();
void setup() {
dezibot.begin();
}
void loop() {
dezibot.motion.move();
delay(1000);
dezibot.motion.rotateAntiClockwise();
delay(1000);
dezibot.motion.rotateClockwise();
delay(1000);
dezibot.motion.stop();
delay(1000);
}