ESP32 and servo controller/ ninja failed with exit code 1

Any bugs you encounter with Flowcode should be discussed here.
BenR
Matrix Staff
Posts: 1895
http://meble-kuchenne.info.pl
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,

Via C code using the servo controller component might be possible yes.

Try this function out.

FC_CAL_PWM_ChangeFrequency_1(100);

Where _1 is channel 1 and 100 is 100Hz duty.

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 »

....mh OK!! Putting that statement in a C Box will come back with a compiler error. It will not compile.

I assume the ESP32 C Box code is may differnt.

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 »

Hi Ben,

additional feedback. I just tried to open up a second servo controller in order to get at least 16 servo channels.
Then you get a compiler error again.

So is the limit 8 channels??

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,

I have tested the servo controller further on.

If I assign two servos compiles perfectly like with one servo

If I assign 3 servo channels in the servo controller, complier quits with a error.
ESP32_Test_Servocontroll_3CH.fcfx
(11.65 KiB) Downloaded 267 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,

The servo count is limited to 8 channels at the moment but in theory we could get this up to 12 on the ESP32 hardware. Let me know if this would be useful.

I tried to replicate the problem with 3 channels but it compiled correctly for me. Please can you attach the msg.txt file from the failed compilation and I'll have a look at what caused your error.

Adding the C code to set the freuency to 100Hz also worked ok for me. I've attached your current program with the c code in place to make channel 1 100Hz. Note that channels 1 and 2 share a timer and hence will probably always run at the same rate. Same goes for channels 2 and 3 etc.
ESP32_Test_Servocontroll_3CH.fcfx
(11.87 KiB) Downloaded 244 times

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,

attached the message file from compiler:
ESP32_Test_Servocontroll_3CH.msg.txt
(14.27 KiB) Downloaded 269 times
Yes 12 Servo channel would be perfect and great.

I`ll check your modified file. I´ll come back with a feedback.

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 »

Hi Ben,

your modified FC9 file with the 100Hz C-Box comes with a compiler error too at my installation.

Attached the message file:
ESP32_Test_Servocontroll_3CH.msg.txt
(157.03 KiB) Downloaded 247 times

Very strange that it runs at your side. May some wrong compiler settings at my installation??

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,

Hello Matrix Team,

with the latest FC9 Update from today it now compiles with more then 2 servos assigned in the controller.

The C-code for different frame rates compiles OK too.

Many thanks!!

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,

today I like to come back the the possibilty of 12 Servos outputs with ESP32. Do you have any news on this topic.

BR

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

Post Reply