I have a 3D printer, so now I can print my own flight simulator yoke, throttles etc. But I'm having no luck finding any tutorials doing this with Micropython, ESP32 or Raspberry Pi.
There are lots of online videos and tutorials with Arduino, like this below.
https://www.youtube.com/watch?v=nO-lanE ... aelRechtin
This is the closest I've seen using a Raspberry pi, but this is just using keyboard shortcuts (around 16 minute mark)
https://www.youtube.com/watch?v=8gUytbt ... 7sHardware
Flight simulator controls Micropython
Re: Flight simulator controls Micropython
Or even in Python, is this possible? So I want to be able to 3D print a throttle, then I assume put potentiometer, and connect it to Raspberry Pi or ESP32 to fly.
Re: Flight simulator controls Micropython
It looks like Arduino have a joystick library, for exactly this purpose, but what about Python / MicroPython?
https://github.com/MHeironimus/ArduinoJoystickLibrary
https://github.com/MHeironimus/ArduinoJoystickLibrary
Re: Flight simulator controls Micropython
Any help will be appreciated
Re: Flight simulator controls Micropython
Micropython doesn't really have that great USB support at the moment.
Circuitpython (https://circuitpython.org/) does have a HID library that supports gamepads: https://docs.circuitpython.org/projects ... ad-gamepad
Circuitpython (https://circuitpython.org/) does have a HID library that supports gamepads: https://docs.circuitpython.org/projects ... ad-gamepad
Re: Flight simulator controls Micropython
The CircuitPython team have put more emphasis on USB HID control access than the MicroPython developers. The reason there are more Arduino tutorials is that the Arduino has been around for decades longer, and search engines prioritize old stuff. There are also the Arduino Leonardo and Micro boards which make HID work quite simple (if inflexible).
What boards were you planning to use? I don't think traditional ESP32 boards can work as HID input, as they have a USB-Serial chip that prevents them behaving like a USB input device. CircuitPython on a Raspberry Pi Pico should be able to work as a USB input device.
I've previously used small Adafruit CircuitPython boards for HID input, and they were quite reliable for custom assistive input devices for people with disabilities.
What boards were you planning to use? I don't think traditional ESP32 boards can work as HID input, as they have a USB-Serial chip that prevents them behaving like a USB input device. CircuitPython on a Raspberry Pi Pico should be able to work as a USB input device.
I've previously used small Adafruit CircuitPython boards for HID input, and they were quite reliable for custom assistive input devices for people with disabilities.
Re: Flight simulator controls Micropython
Yes, I'm using a traditional ESP32, looks like this is what I need. Or may be learn Arduino.
https://www.hackster.io/news/darkfullda ... 056125070c
https://www.hackster.io/news/darkfullda ... 056125070c
Re: Flight simulator controls Micropython
The ESP32 doesn't have USB support at all. The USB interface on most ESP32 boards is provided by an external chip that just does USB UART.
To make this work with ESP32 you'd need something running on your PC that receives commands via serial, and then injects them into your flight sim (either by simulating an input device/gamepad or keyboard).
Re: Flight simulator controls Micropython
I try to achieve pretty much the same think (steering wheel) with my son, the way have taken is via bleutooth because esp32 have a pretty good bluetooth support.
Heerkog have a working example of a basic joystick:
https://github.com/Heerkog/MicroPythonBLEHID
The next step is to build / find a HID descriptor that make it recognize as a steering wheel. This step is not as straightforward as I firstly thought !
If you like to follow this route I can share some links about HID descriptors.
Heerkog have a working example of a basic joystick:
https://github.com/Heerkog/MicroPythonBLEHID
The next step is to build / find a HID descriptor that make it recognize as a steering wheel. This step is not as straightforward as I firstly thought !
If you like to follow this route I can share some links about HID descriptors.
nodemcu V2 (amica)
micropython firmware Daily build 05/31/2016
micropython firmware Daily build 05/31/2016