MHeironimus / ArduinoJoystickLibrary

An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support.
GNU Lesser General Public License v3.0
2.06k stars 403 forks source link

Communication problem #271

Closed dimigav closed 1 year ago

dimigav commented 1 year ago

Dear all,

I'm not sure if this is an issue. Please correct me if I'm wrong. I made an flight controller with 2 axis (implemented by 4 loadcells and their amplifiers) and 23 buttons (using 3 SN74HC165 PISO configuration as @MHeironimus suggests). My problem is that everything works fine until I decide to close the Arduino IDE software. Then the controller identified by Windows as Game controller but no action when I press a button or moving the stick received. I checked the initAutoSendState variable that is TRUE. What else?

MHeironimus commented 1 year ago

It is hard to say without seeing your code, but one possibility is you are using the serial port in such a way that it requires the Serial Monitor to be running. If you have any code that is writing out to the serial port, try commenting it out.

dimigav commented 1 year ago

It is hard to say without seeing your code, but one possibility is you are using the serial port in such a way that it requires the Serial Monitor to be running. If you have any code that is writing out to the serial port, try commenting it out.

Dear M.,

I want to close the issue positive because the fault was mine. When the Arduino IDE runs open the serial communication and this communication remains open after the closing. But, if you unplug the usb of arduino micro an then plug it again , it works fine.

So, thank you very much. Your comment is very usefull.