ESP32 and servo controller/ ninja failed with exit code 1

Any bugs you encounter with Flowcode should be discussed here.
dvcam99
Posts: 94
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

ESP32 and servo controller/ ninja failed with exit code 1

Post 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.
ESP32_Test3.fcfx
(11.49 KiB) Downloaded 292 times
BR
Dirk
Happy FC9, FC-8 and FC-6 professional user ;)

BenR
Matrix Staff
Posts: 1895
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 491 times
Been thanked: 664 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post by BenR »

Hi Dirk,

Thanks for letting us know. I'll investigate and see if I can get this resolved for you.

dvcam99
Posts: 94
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post by dvcam99 »

Hi Ben,

very good!! Thanks in advance

Dirk
Happy FC9, FC-8 and FC-6 professional user ;)

BenR
Matrix Staff
Posts: 1895
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 491 times
Been thanked: 664 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post 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.

dvcam99
Posts: 94
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post by dvcam99 »

Many Thanks Ben,

I will check it out with in the next weeks

BR

Dirk
Happy FC9, FC-8 and FC-6 professional user ;)

dvcam99
Posts: 94
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post by dvcam99 »

Hello Ben,

just checked the attached FC9 file with serco controller. Unfortunately it give still a complier error.
ESP32_Test3_1.fcfx
(11.49 KiB) Downloaded 244 times

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
Happy FC9, FC-8 and FC-6 professional user ;)

BenR
Matrix Staff
Posts: 1895
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 491 times
Been thanked: 664 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post 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.

dvcam99
Posts: 94
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post by dvcam99 »

Hi Ben,

many thanks for the super fast fix!! Works great. :D

Scope shot below:
esp32servo20ms.png
esp32servo20ms.png (116.76 KiB) Viewed 6670 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
Happy FC9, FC-8 and FC-6 professional user ;)

BenR
Matrix Staff
Posts: 1895
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 491 times
Been thanked: 664 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post 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.

dvcam99
Posts: 94
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: ESP32 and servo controller/ ninja failed with exit code 1

Post 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
Happy FC9, FC-8 and FC-6 professional user ;)

Post Reply