jhemcu / FC-ESC-Firmware

49 stars 16 forks source link

Obtaining orientation angles from UART #19

Open brightproject opened 7 months ago

brightproject commented 7 months ago

@jhemcu Thanks for your work. I purchased a flight controller F4 NOXE V3(JHEF411) and am trying to get orientation angles from it. By and large, I don’t need the full functionality of a flight controller - controlling motors, rudders, route planning, etc., I only need to get the roll, pitch and yaw angles. But more on that later. To begin with, I just wanted to get some data from the board. configurator I started getting acquainted with the betaflight firmware, loaded the through the configurator and was able to see the display of the quadcopter in the configurator, which changed its position depending on the position of the board. Config as https://github.com/betaflight/unified-targets/blob/master/configs/default/JHEF-JHEF411.config

resource SERIAL_TX 1 B06
resource SERIAL_TX 2 A02
resource SERIAL_RX 1 B07
resource SERIAL_RX 2 A03

In the same configurator, I configured the UART1 and UART2 pins as output or input. ports I soldered the pins as in the picture: 2023-07-08-13-54-284 I read several threads on GitHub and forums, but could not get the data through RX1/TX1 or RX2/TX2. I tried to select the MSP or Crossfire protocol, but to no avail. I also want to note that I do not have control panels, and I receive data into the naked serial port through an adapter CH340 and of course I understand that protocol data comes in binary form, but even garbage does not always end up in the serial port. The next step I tried to install the firmware from iNav, there is no firmware for my board through the configurator, and I loaded the firmware locally, downloaded from the firmware, but I also could not output anything to the serial port. Just like I couldn’t write any data to the EEPROM memory module built into the board. What do I need to do so that the flight controller firmware does not block the fixation of orientation angles and records them on a “black box” or transmits telemetry via UART?