Cleric-K / vJoySerialFeeder

Feed Virtual Joystick driver with data from a serial port
GNU General Public License v3.0
252 stars 55 forks source link

vJoy does not receive inputs | Arduino #78

Open Nacreo opened 4 months ago

Nacreo commented 4 months ago

Hey folks! It's been a while since there was activity on this project, stillI figured it would still be worth a shot to post my problem: I want to "convert" my old toy-grade controller to a Sim-Controller. It is very similar to the one shown in the example: Basically the same, but from a 3D helicopter. Wiring is basically identical nevertheless.

So, I am using an Arduino Leonardo. When testing with the Arduino "Read Analog Voltage" code and a standalone potentiometer, I can read values from the serial monitor. So that works. Once I start using the joystick.ino code (Basically exactly the same, just with "byte analogPins[] = {A0, A1, A2, A3};" and "#define ANALOG_REFERENCE EXTERNAL" changed), I still get something from the Arduino serial monitor. Its some non-readable values. Just various symbols. But at least they change when turning the potentiometer. So there must be some kind of input. Yet, neither with my test-potentiometer or the remote I can get vJoySerialFeeder to read any values. Really don't know where to go from here... Hopefully someone can help out :) Thank you!

Nacreo commented 4 months ago

I have some more information: When testing in "Terminal", just by clicking connect nothing is read. Sometimes, a single cycle of 10ms is read. But then nothing more. But If I, while keeping the com port connected, switch ANY SETTING within Terminal (Baud Rate, Data Bits, Parity, Stop Bits, Handshaking) to ANYTHING else it starts to continuously send data. I am thinking that there is some problem with the loop/start function? That is, because when observing the "Tx" light on my Arduino Leonardo I noticed something that indicates just that: After connecting the COM to "Terminal" TX usually does not light up - If anything, one short flash (I suppose one 10ms cycle) - Then it also shows very little data. But when altering any of the settings without before disconnecting the COM beforehand it lights up continuously - And sends continuous data... Any help is welcome.

Cleric-K commented 4 months ago

I'm not familiar with Arduino Leonardo but I wonder if there's something that indeed triggers the start of the process. On ordinary Arduinos it doesn't matter whether the COM port is connected. Maybe you can try powering up the Arduino not through USB but other 5V source. The TX light should be flashing as soon as it is powered up. Do you have some other Arduino to test with? Uno, nano?

Nacreo commented 4 months ago

I can't think of an external power source that I have laying around. I got to admit, I was starting to think it was some setting in the Leonardo itself - Because I tested it on two separate ones! Nevertheless, in theory, it should just be a bigger version of the UNO with a few more ports. To be sure, I'll order a Nano (Details: Nano V3 | Atmega328 CH340) which should arrive tomorrow. I will then test again and write my findings here. Thanks for giving me some hope.