I'm trying to control a drone motor with teensy 4.0. This is my code:
#include <Servo.h>
#define pin_esc 23
Servo esc;
void setup() {
esc.attach(pin_esc);
esc.writeMicroseconds(1000);
delay(1000);
}
void loop() {
int val = analogRead(A0);
//val = map(val, 0, 1023, 1000, 2000);
esc.writeMicroseconds(1500);
delay(15);
}
In teensyduino 1.8.13 works well, but when I trying in Platformio i get this error:
"This library only supports boards with an AVR, SAM or SAMD processor."
I looked for the servo lib in teensyduino but I didn't find it.
#include <Servo.h>
#define pin_esc 23
Servo esc;
void setup() {
esc.attach(pin_esc);
esc.writeMicroseconds(1000);
delay(1000);
}
void loop() {
int val = analogRead(A0);
//val = map(val, 0, 1023, 1000, 2000);
esc.writeMicroseconds(1500);
delay(15);
}
In teensyduino 1.8.13 works well, but when I trying in Platformio i get this error:
"This library only supports boards with an AVR, SAM or SAMD processor."
I looked for the servo lib in teensyduino but I didn't find it.