mirror of
https://gitlab.waag.org/make/fablab/interns/2025/sam.git
synced 2025-08-04 12:24:56 +00:00
first steps for drone firmware
This commit is contained in:
@@ -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/
|
Reference in New Issue
Block a user