I wrote some code to test a ESC I bought for my sumo robot. To control the motors with an Arduino, I would use the writeMicroseconds() function from the Servo library with a value ranging from 1000 to 2000 (with 1500 being neutral) as a parameter.
Now, instead of an Arduino nano, I’m using a Blackpill (STM32F401CCU6). And when I try to compile the code, I get the following error:
In file included from src/main.cpp:3:
.pio/libdeps/blackpill_f401cc/Servo/src/Servo.h:77:2: error: #error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor."
77 | #error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor."
| ^~~~~
I don’t understand why it doesn’t work because the error says that the SMT32F4 platform is supported.
I’ve seen that it is possible to generate the signal I want with different methods, but I want to make this one work because of its simplicity.
I’m sort of new to development on microcrontrollers, so if this question seems naive, it’s because it is.