Hello Fellow Yuneec Pilot!
Join our free Yuneec community and remove this annoying banner!
Sign up

Reverse engineering CGO3+ UART

I was just amazed that AI wrote anything remotely useful. The first iteration assumed 50Hz. The 2nd iteration based on 250Hz used the following to assign the pulse widths:

Code:
dutyCycle = map(flightControllerSignal, 1000, 2000, 0, 180);  // Mapping to servo position

Then used the write function with the duty cycle. I haven't analyzed it any depth.

Edit:

The 2nd iteration ChatGPT used the ESP32Servo Library which is essentially a wrapper for the ledc functions for Arduino from Espressif. The AI code probably could have be written or modified to explicitly set the frequency at 250Hz.
 
Last edited:

New Posts

Members online

No members online now.

Forum statistics

Threads
21,141
Messages
243,757
Members
27,796
Latest member
bxt3r