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 Connected,Failsafe(waiting for serial data) #70

Closed RicheClaw15 closed 1 year ago

RicheClaw15 commented 1 year ago

I am using arduino uno with toy grade rc controller. TX light is not flashing. Wayback it worked fine but now this not working.

Cleric-K commented 1 year ago

Maybe try to reflash the uno to make sure its flash memory is OK.

RicheClaw15 commented 1 year ago

i tried blink from example and arduino uno board is fine can there be any other problem

Cleric-K commented 1 year ago

You can see if there's any communication at all coming from the arduino. Check this: https://github.com/Cleric-K/vJoySerialFeeder/issues/24#issuecomment-504308045

RicheClaw15 commented 1 year ago
Untitled

i got this

Cleric-K commented 1 year ago

It seems you're not sending any channel data from the Arduino. These are valid packets but they carry no channels. Can you explain your setup? From where do you read your inputs? Maybe you can also paste your Arduino sketch.

RicheClaw15 commented 1 year ago

My setup: I use an old toy grade rc controller with arduino uno

RicheClaw15 commented 1 year ago
sketch
RicheClaw15 commented 1 year ago
sketch 2
RicheClaw15 commented 1 year ago
sketch 3
RicheClaw15 commented 1 year ago
sketch 4
Cleric-K commented 1 year ago

You could have just copy-pasted the code as text.

Anyway, you need to edit the line

// example:
// byte analogPins[] = {A0, A1, A2, A3};
// This will send four analog channels for A0, A1, A2, A3 respectively

byte analogPins[] = {};

You need to insert between the braces the analog pins which you will be reading.

RicheClaw15 commented 1 year ago

anything left

RicheClaw15 commented 1 year ago

what about digital pins and bitmapped pins

Cleric-K commented 1 year ago

These are needed if you want to use buttons/switches. What is your hardware setup? Do you read only the four axes of the sticks? Or you have more inputs?

RicheClaw15 commented 1 year ago

only four axis

RicheClaw15 commented 1 year ago

but still it does not work

Cleric-K commented 1 year ago

Are you sure you can at all read the analog voltage? Maybe you should first try something like https://docs.arduino.cc/built-in-examples/basics/ReadAnalogVoltage to make sure that everything is working.

RicheClaw15 commented 1 year ago
readings

i got this

Cleric-K commented 1 year ago

Then it should work with the other sketch too, like: byte analogPins[] = {A1}; If you test this with the terminal app there should be values

RicheClaw15 commented 1 year ago
reading a1

i got this

Cleric-K commented 1 year ago

This seems right. You should be able to see that single channel in vjsf.

RicheClaw15 commented 1 year ago
vjoy

still not working

Cleric-K commented 1 year ago

Strange. Are you sure the Port Setup settings are at default?

RicheClaw15 commented 1 year ago

no its not at default

RicheClaw15 commented 1 year ago

bro thanks now it works

Cleric-K commented 1 year ago

OK, I don't know why it timed out before.

RicheClaw15 commented 1 year ago

my data keeps fluctuating is there anyway to standard it

Cleric-K commented 1 year ago

You mean that you get disconnected or the values are noisy?

RicheClaw15 commented 1 year ago

the values fluctates a bit

Cleric-K commented 1 year ago

That's normal with the Arduino analog-digital conversion from simple potentiometers. Unless it causes noticable jerky movements while you play, it's not a problem.

RicheClaw15 commented 1 year ago

ok thanks brother