first steps for drone firmware

This commit is contained in:
2025-01-27 17:19:19 +01:00
parent a82bd8beb5
commit f3d04a368d
2 changed files with 25 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
#include <FastLED.h>
#include "conf.h"
#include <Adafruit_BNO08x.h>
#include <sh2.h>
#include <sh2_SensorValue.h>
@@ -8,7 +8,11 @@
#include <shtp.h>
void setup() {
// put your setup code here, to run once:
// Setup all ESC
ledcAttach(MOTOR1, PWMFREQ, PWMRESOLUTION);
ledcAttach(MOTOR2, PWMFREQ, PWMRESOLUTION);
ledcAttach(MOTOR3, PWMFREQ, PWMRESOLUTION);
ledcAttach(MOTOR4, PWMFREQ, PWMRESOLUTION);
}
@@ -16,3 +20,13 @@ void loop() {
// put your main code here, to run repeatedly:
}
void calibrateESC() {
ledcWrite(MOTOR1, 1100);
ledcWrite(MOTOR2, 1100);
ledcWrite(MOTOR3, 1100);
ledcWrite(MOTOR4, 1100);
}
//https://randomnerdtutorials.com/esp32-pwm-arduino-ide/