Open
Description
It looks like the Servo library is not compatible with Arduino Portenta H7 board yet.
I got these errors when compiling the code:
\Arduino\libraries\Servo\src\mbed\Servo.cpp: In member function 'void ServoImpl::start(uint32_t)':
\Arduino\libraries\Servo\src\mbed\Servo.cpp:31:66: warning: 'void mbed::TickerBase::attach(F&&, float) [with F = mbed::Callback<void()>]' is deprecated: Pass a chrono duration, not a float second count. For example use `10ms` rather than `0.01f`. [since mbed-os-6.0.0] [-Wdeprecated-declarations]
ticker.attach(mbed::callback(this, &ServoImpl::call), 0.02f);
mbed_portenta\4.0.10\cores\arduino/mbed/drivers/include/drivers/Ticker.h:92:10: note: declared here
void attach(F &&func, float t)
^~~~~~
Arduino\libraries\Servo\src\mbed\Servo.cpp: In member function 'void ServoImpl::call()':
Arduino\libraries\Servo\src\mbed\Servo.cpp:35:80: warning: 'void mbed::TickerBase::attach(F&&, float) [with F = mbed::Callback<void()>]' is deprecated: Pass a chrono duration, not a float second count. For example use `10ms` rather than `0.01f`. [since mbed-os-6.0.0] [-Wdeprecated-declarations]
timeout.attach(mbed::callback(this, &ServoImpl::toggle), duration / 1e6);
^
In file included from packages\arduino\hardware\mbed_portenta\4.0.10\cores\arduino/mbed/mbed.h:84:0,
packages\arduino\hardware\mbed_portenta\4.0.10\cores\arduino/mbed.h:8,
Arduino\libraries\Servo\src\mbed\Servo.cpp:5:
packages\arduino\hardware\mbed_portenta\4.0.10\cores\arduino/mbed/drivers/include/drivers/Ticker.h:92:10: note: declared here
void attach(F &&func, float t)
Additional context
Forum topic for discussion and support: https://forum.arduino.cc/t/the-servo-library-not-fully-compatible-with-arduino-h7-yet-how-can-i-fix-this-issues/1220513