Share My Creation DJI motion controller

Hi all,

Here is a simple mod of the excellent @wonder Generic Gamepad Support.

It offers the possibility to convert a DJI motion controller (used for my Avata drone) into a "regular joystick"

DJI_motionController11.jpg


Difficulty was only to convert the "raw" controller's values into a regular yaw/pitch/roll control.

See all the story here : DJI motion controller used as a regular joystick

Now what I am looking for is a way to embed the same code into an ESP32-S3 device acting with USB host capacbilities (currently the HID library crashes when connecting the motion controller)

To test my joystick "outside the Android phone", I wondered if it would be possible, using B4A to expose a BLE joystick ? I have searched the forum but didn't find such a program.

 

freedom2000

Well-Known Member
Licensed User
Longtime User
I even added a UDP transmission of computed angles yaw/pitch/roll + trhottle to an ESP32 using UDP.

The ESP32 exposes a BLE joystick (I don't know how to do this with B4A...)
Then this joystick is visible by Windows (but not by my Phoeninx Simulator)

So final flowchart is (over engineered !)
  • control : DJI MotionController (IMU high accuracy)
  • connection : USB host
  • process : Android (Raw data conversion).
  • network : UDP Unicast with broadcast discovery (zero config, minimal latency).
  • Payload : JSON (compacted)
  • Output : ESP32 BLE Gamepad
  • decoding : PC USB HID virtual joystick (details here : https://hackaday.io/project/204638-a-bluetooth-joystick-for-tx16s-radio-or-others)
  • running: PhoenixRC launcher
  • flying : Phoenix RC controlled by the eggplant !
eggPlant.jpg


 
Top