Jump to content

an Arduino USB HID controller, composite USB controller


overpro

Recommended Posts

I suspect SV Mapper doesn't recognize the button press correctly, I used Microsoft Message Analyzer - MMA to capture the USb device HID packages and I can see the HID report is correct.

..................

I'm thinking it might be better to test it under FSUIPC directly.

 

Hi overpro,

 

This is to confirm that FSUIPC-LUA correctly recognizes all 256 encoder button/button presses as unique 'virtual joystick' button presses in FSX, and so these actions are uniquely assignable there.

 

Thank you for your outstanding contribution!:thumbup:

 

Chakko.

Link to comment
Share on other sites

Hi again, overpro,

 

I cannot thank you enough for the time and trouble you have taken to create the alternative 256-button*1HID version of your firmware. Fantastic contribution to our hobby! :v:

 

It occurred to me that in situations where one is attaching more than one such Arduino HID-joystick to the (FSX/FSUIPC) PC, it would help to identify each Arduino with a unique serial number, so that each could be associated definitely with a separate cockpit device. This has been a useful feature of Bodnar and Pokeys cards that I have also been using.

 

As I understand it, each Arduino programmed with your firmware will have the serial number 'C2', and this has the potential to cause confusion when more than one is attached.

 

Is there any simple way of 'stamping' unique serial numbers on each device? Or, would you consider creating some sort of plugin where this number could be inserted/changed by the end-user?

 

Thank you anyway for everything that you have done!:thumbup:

 

Chakko.


Edited by tomahawk66
Link to comment
Share on other sites

Hi again, overpro,

 

I cannot thank you enough for the time and trouble you have taken to create the alternative 256-button*1HID version of your firmware. Fantastic contribution to our hobby! :v:

 

It occurred to me that in situations where one is attaching more than one such Arduino HID-joystick to the (FSX/FSUIPC) PC, it would help to identify each Arduino with a unique serial number, so that each could be associated definitely with a separate cockpit device. This has been a useful feature of Bodnar and Pokeys cards that I have also been using.

 

As I understand it, each Arduino programmed with your firmware will have the serial number 'C2', and this has the potential to cause confusion when more than one is attached.

 

Is there any simple way of 'stamping' unique serial numbers on each device? Or, would you consider creating some sort of plugin where this number could be inserted/changed by the end-user?

 

Thank you anyway for everything that you have done!:thumbup:

 

Chakko.

 

You are correct, the Serial number should NOT be hardcoded, let me check if Atmega16u2 has some sort of build in serial number in the chip.

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

Ian;2527973']Theres an application note for that: AVR922: Add a Serial Number to your USB

Device

. It doesn't explicitly say whether it applies to the ATMega16U2, but it is linked from this page, so I assume it does.

Unfortunately, the atmega series doesn't have unique identifier in the chip.

I'm thinking to read the SN from EEPROM, so people can use FLIP to change their own SN stored in EEPROM.

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

  • 2 weeks later...

Hello all,

 

first of all thank you for this excellent work.I have some questions :

 

1.Is it possible to create a firmware myself for 16 buttons,4 rotaries and 4 toggles for example?

2.Is it possible to disable AXIS and use only buttons,rotaries and toggles?

3.How can i change the name of the new Joystick device?

4.How can i create a single joystick and not the 2 joysticks?

 

thank you very much!

Link to comment
Share on other sites

Hello all,

 

first of all thank you for this excellent work.I have some questions :

 

1.Is it possible to create a firmware myself for 16 buttons,4 rotaries and 4 toggles for example?

2.Is it possible to disable AXIS and use only buttons,rotaries and toggles?

3.How can i change the name of the new Joystick device?

4.How can i create a single joystick and not the 2 joysticks?

 

thank you very much!

 

Yes, it's possible, you might want to check the arduino and the atmega16u2 firmware source code first.

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

Hello ,

 

i did this wiring and rotary works fine...i connect it to pins 22(GND)-40(A)-41(B).....but push button not works!!...when i connect it to 31 and 38 pins and i press the button all the AXIS goes to 0 (totally left)...

Any help please?

yNWRju.thumb.jpg.1abc6ea77dfcfc17bf9f7eeab36781e2.jpg

Link to comment
Share on other sites

Hello ,

 

i did this wiring and rotary works fine...i connect it to pins 22(GND)-40(A)-41(B).....but push button not works!!...when i connect it to 31 and 38 pins and i press the button all the AXIS goes to 0 (totally left)...

Any help please?

 

which program did you used for testing the button?

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

which program did you used for testing the button?

 

i use the controller properties from windows control panel.I have use the code with one controller and 256 buttons..When i use the code with 2 joysticks , button and rotary works fine.

Is it normal?

Link to comment
Share on other sites

i use the controller properties from windows control panel.I have use the code with one controller and 256 buttons..When i use the code with 2 joysticks , button and rotary works fine.

Is it normal?

 

Got it, the windows control panel can only show 32 buttons which are all occupied by rotary encoders on 1st HID controller, so you have to use something else for testing, like this one:

http://www.planetpointy.co.uk/?dl_id=5

 

Regarding change the joystick name, as you have installed a Ubuntu 14.04 VM,

please try compile the firmware first, by following this procedures on my first post:

---------------------------------

Firmware compilation instruction

---------------------------------

 

If the compilation success, you can change the name by editing Descriptor.c

and change ProductString struct's UnicodeString member:

const USB_Descriptor_String_t PROGMEM ProductString =
{
   .Header                 = {.Size = USB_STRING_LEN(14), .Type = DTYPE_String},
       
   .UnicodeString          = L"C.V.P Joystick"    //change the string at here,
                                // note that the you need to change .Size number accordingly
};

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

Got it, the windows control panel can only show 32 buttons which are all occupied by rotary encoders on 1st HID controller, so you have to use something else for testing, like this one:

http://www.planetpointy.co.uk/?dl_id=5

 

Hi overpro and Maximvs,

 

Just a reminder that if Maximvs is using your 1HID*256 buttons version, then, as we discussed in posts #142 and #144 and #153:

 

(i) Pointy's joystick test will not work

 

(ii) SV Mapper will work, but only for the first 128 buttons......the remaining show spurious returns

 

(iii) FSUIPC + LUA is successfully able to handle all 256 buttons

 

Regards,

 

Chakko.


Edited by tomahawk66
Link to comment
Share on other sites

have you checked the arduino schematic?

AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS

 

Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow.

Link to comment
Share on other sites

yes!...i found it!!....i understand how matrix works i think....

 

i have connect:

 

2 push buttons

2 rotaries

1 toggle ON-OFF switch

1 toggle 3 pins switch.

 

everything works!!..thank you very much.

 

i found how "pairing" the cables to use more than one device on one arduino pin.

 

Sorry for my questions but it's the first time that i use matrix controller. :smilewink:

Link to comment
Share on other sites

..also,i am sure that someone of you have use this aircraft switch.I connect the 12V connector to 5V arduino's pins - the GND connector on 38 arduino's pin and the LIGHT connector to 43 arduino's pin...The switch works but the led of the switch is ON when the switch is OFF and led is OFF when the switch is ON......weird!!!

 

rBVaGlVy-KWAFgxeAAFVz8DHYBo518.jpg

Link to comment
Share on other sites

When i press push button or rotary encoder , are working ok...but look what happened in this row....what is this? :cry:

 

Well, this image give me an impression that you are using the arduino code which implemented 8 OnOffOn toggle switch algorithm,

the OnOffOn toggle switch off position is also a "On" in my implementation, so there are 8 button's lit, which is correct.

 

which arduino code are you using? is it the one from my first post or is it the one from post 150?

http://forums.eagle.ru/showpost.php?p=2524345&postcount=150


Edited by overpro

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

..also,i am sure that someone of you have use this aircraft switch.I connect the 12V connector to 5V arduino's pins - the GND connector on 38 arduino's pin and the LIGHT connector to 43 arduino's pin...The switch works but the led of the switch is ON when the switch is OFF and led is OFF when the switch is ON......weird!!!

 

rBVaGlVy-KWAFgxeAAFVz8DHYBo518.jpg

 

This is not weird because my implementation in the arduino code, the column pins ( 38~54) are configured as input with pull up resistor enabled, that's say if it's not connected to anything else the pin is in HIGH state (+5V) by default,

So if the switch is in the off position, the column pin 39 is in +5V state, the small light bulb is on. If you flip to On position, the pin 39 is in LOW state, the light goes off.

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...