FreeJoy-Team / FreeJoy

STM32F103 USB HID game device controller with flexible configuration
GNU General Public License v3.0
704 stars 134 forks source link

Analog axis very noisy if not connected #206

Open choromeeua opened 1 year ago

choromeeua commented 1 year ago

I use a joystick module on ports A0 and A1 as an analog signal, with my joystick module connected it works very well, but when removing the module the axes jump and oscillate a lot, any way to solve or improve this? Thank you, I'm looking for a solution.

Screenshot_3

virtual812 commented 1 year ago

Disconnecting the sensor and leaving the analogue pins floating is unfortunately going to have that side effect.

The analogue pins are 'floating' and have are in an 'indeterminate state'.

If you want them to stop moving you can could possibly make a connector that connects A0 and A1 to ground.

If you want them to remain somewhat centred then you could make up a divider that holds both A0 and A1 in a middle position.

Let me know if you want any more information on how to do this, include a picture of how your disconnected analogues look if you can and I can come back with a detailed solution.