Nano 33 BLE + Servo library will not compile

On the first attempt the error message shows: "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor." Cause: The NANO 33 BLE has "#define ARDUINO_ARCH_NRF52840", but Servo.h knows only "#define ARDUINO_ARCH_NRF52" Correction in Servo.h: Supplement (duplicate):

elif defined(ARDUINO_ARCH_NRF52)

include "nrf52/ServoTimers.h"

#elif defined(ARDUINO_ARCH_NRF52840) ** #include "nrf52/ServoTimers.h"** Result: Servo is accepted, but there are more error messages: D:\Arduino\libraries\Servo\src\nrf52\Servo.cpp:92:35: error: 'PinDescription {aka struct _PinDescription}' has no member named 'ulPWMChannel' instance=(g_APinDescription[pin].ulPWMChannel & 0xF0)/16; ... D:\Arduino\libraries\Servo\src\nrf52\Servo.cpp:123:35: error: 'PinDescription {aka struct _PinDescription}' has no member named 'ulPWMChannel' instance=(g_APinDescription[pin].ulPWMChannel & 0xF0)/16;

The pin description in g_APinDescription or PinDescription itself may be wrong? I find some different declarations in "variant.cpp" for the different processor families.

Please follow: Initial porting to mbed cores (Nano33BLE) by facchinm · Pull Request #32 · arduino-libraries/Servo · GitHub

Hello - thank you! With this couple of changes and extensions it compiles. Ant it moves the servo to a desired position. But I have a sketch with acceleration/deceleration and speed control for a servo, that runs on a Nano Classic and a Nano Every, but not on the Nano 33 BLE. The best way is perhaps to wait for an official update of the servo library. I have given a comment to the developer of the servo extension for mbed.

Hello RudolfAtRTC,

Thanks for sharing your issues ! I faced the same trouble you faced and your details helped me. Would you agree to share the last steps you did to make your servo work at the right angle? Actually I don’t need acceleration in my script, so Im really interesting in your solution.

Thanks in advance !