2 of 3 Inlined the link

I propose to use a flight controller resp. a FC software like Betaflight connected to a Arduino or Raspberry Pi.

The new F3 or F4 flight controllers have, in general, I2C/SPI interfaces where you can call the FC functions.