Page 1 of 2
ESP32 and servo controller/ ninja failed with exit code 1
Posted: Thu Jan 07, 2021 5:56 pm
by dvcam99
Hello together,
it seems to me that the servo controller component is not compatible with ESP32.
Compiling faild with the following message:
ninja failed with exit code 1
Attached the FC programm.
BR
Dirk
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Fri Jan 08, 2021 4:47 pm
by BenR
Hi Dirk,
Thanks for letting us know. I'll investigate and see if I can get this resolved for you.
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Sat Jan 09, 2021 5:18 pm
by dvcam99
Hi Ben,
very good!! Thanks in advance
Dirk
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Wed Mar 03, 2021 9:39 am
by BenR
Hello Dirk,
Sorry for the delay the Servo motor component should now be supported by the ESP32 hardware. The only thing currently not supoorted is the AutoMove functions. The SetPosition and MoveToPosition macros should work correctly.
Please let me know if you have any problems.
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Thu Mar 11, 2021 12:01 pm
by dvcam99
Many Thanks Ben,
I will check it out with in the next weeks
BR
Dirk
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Fri Mar 12, 2021 5:53 pm
by dvcam99
Hello Ben,
just checked the attached FC9 file with serco controller. Unfortunately it give still a complier error.
cc1.exe: some warnings being treated as errors
ninja: build stopped: subcommand failed.
Executing action: all (aliases: build)
Running ninja in directory h:\esp32\esp32_test3_1\build
Executing "ninja all"...
ninja failed with exit code 1
Build Failed
.
Autoclose turned off
FINISHED
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Fri Mar 12, 2021 9:44 pm
by BenR
Hello,
Many thanks for letting me know. I have replicated the problem you're having and have fixed it in the latest component. The problem was caused by only having a single servo channel enabled and it seems I had only tested with all 8 enabled. It should work as expected for you now.
I would also move the SetPosition call from inside the loop, to just before the loop in your program as updating the position in such a tight loop might cause you problems.
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Fri Mar 12, 2021 11:46 pm
by dvcam99
Hi Ben,
many thanks for the super fast fix!! Works great.
Scope shot below:

- esp32servo20ms.png (116.76 KiB) Viewed 10105 times
Additional question!! Is there a way to edit the frame rate. Now it is fixed at 20ms (50Hz). Cool would be 15ms and 10ms (75Hz and 100Hz) too.
BR
Dirk
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Sat Mar 13, 2021 9:48 am
by BenR
Hi Dirk,
Brilliant glad it's working for you the servo controller component is currently fixed to 50hz but the pwm component should allow you to easily do this.
Re: ESP32 and servo controller/ ninja failed with exit code 1
Posted: Sat Mar 13, 2021 5:37 pm
by dvcam99
Hi Ben,
what do you mean with pwm component in order to change the frame rate fromm 50 to 100Hz
Should I use the PWM component instead of the servo controller component?? Is this your suggestion??
May is it possible to change the frame rate via a C-code??
BR
Dirk