Jump to content

an Arduino USB HID controller, composite USB controller


overpro

Recommended Posts

Many thanks. Looking at the pcb it's on, it doesn't look like that will be an easy option. Is there anyway that the second 8 analog pins can be set to be used as digital?

intel i7 6700k overclocked to 4.6, 16GB DDR4 3200MHz, Asus z170 pro gaming motherboard, Asus strix 1080, Max flight stick(modded), MFG Crosswind pedals.

Link to comment
Share on other sites

Hey guys

 

Although I can hold a soldering iron and understand most of the basics I'm pretty noob when it comes to DIY electronics.

So question please:

 

you might need to build a keyboard matrix by your self

 

I get that a 16x16 matrix will be needed for this. Am I correct in assuming this will be a sh*t load of work to build myself? I mean seems that way to me, with a diode on every intersection and all.

 

Or are there ready off-the shelf solutions for this on the market that I could easily order, i.e. a prefab matrix PCB with ready crosspoints that I could instantly start wiring my switches onto?

 

Thanks a lot


Edited by Hollywood_315

There is no spoon.

 

Avatar_old_80x80.gif.0c105925ce4b9f5b87697ea37cbde317.gif

VAICOM PRO plugin for DCS World

www.vaicompro.com

Link to comment
Share on other sites

So as far as I have been able to tell... Yes, a sh*t ton of work. :) I'm in the same boat as you Hollywood. Learning as I go. I have not been able to find any decent PCB's pre-built, due to the size. You can go custom, but it will be huge.

 

Best advice I have got so far is to wire up the matrix's as you need them near each panel, vs one big one.

 

Not pretty but it works.

 

Sage

VFA-25 Fist of the Fleet

[sIGPIC][/sIGPIC]

Virtual Carrier Strike Group One | Discord

Link to comment
Share on other sites

  • 2 months later...

But SPDT takes up connections that you may or may not need, so there's that to consider. For example, Armament HUD Control Panel has need for both. I ordered both types so I can save on some connections.

hsb

HW Spec in Spoiler

---

 

i7-10700K Direct-To-Die/OC'ed to 5.1GHz, MSI Z490 MB, 32GB DDR4 3200MHz, EVGA 2080 Ti FTW3, NVMe+SSD, Win 10 x64 Pro, MFG, Warthog, TM MFDs, Komodo Huey set, Rverbe G1

 

Link to comment
Share on other sites

I always get SPDT. Can just not wire one side and it becomes a SPST if you don't need the extra. I have an SPST gear toggle and I hate it, just haven't got around to swapping it. Hate having to use another program or digging into code to make it send on release vs SPDT just send map gear up to one throw and gear down to the other...

 

 

 

But SPDT takes up connections that you may or may not need, so there's that to consider. For example, Armament HUD Control Panel has need for both. I ordered both types so I can save on some connections.

VFA-25 Fist of the Fleet

[sIGPIC][/sIGPIC]

Virtual Carrier Strike Group One | Discord

Link to comment
Share on other sites

Ah got you. I don't mind modifying lua files to support SPST correctly.

hsb

HW Spec in Spoiler

---

 

i7-10700K Direct-To-Die/OC'ed to 5.1GHz, MSI Z490 MB, 32GB DDR4 3200MHz, EVGA 2080 Ti FTW3, NVMe+SSD, Win 10 x64 Pro, MFG, Warthog, TM MFDs, Komodo Huey set, Rverbe G1

 

Link to comment
Share on other sites

  • 4 weeks later...
UNO digital pin 2~13 can be used so there are 12 pins, which can support 6 * 6 = 36 buttons.

 

Sorry to go back to an old thread overpro but would row 1-4 still be reserved for rotary encoders etc?

intel i7 6700k overclocked to 4.6, 16GB DDR4 3200MHz, Asus z170 pro gaming motherboard, Asus strix 1080, Max flight stick(modded), MFG Crosswind pedals.

Link to comment
Share on other sites

I have this Firmware on my both Arduino-Consoles, one with 80 buttons and one with 100 buttons and 8 axes.

 

Is there any way to make the firmware receiving something from the PC?

 

For example:

i have built my second button-box for StarCitizen.

If any time informations coming from the Game to a connected device, so i wish to have the ability to receive the data from the game into the arduino for response of game-actions.

 

example:

if i switch the light on a spaceship to on, so i want have a LED lighting up.

sure i could do it with arduino itself, but if i press the lightbutton and i am not in a ship, so the led would lighten up, but there is no light to switch.

 

so if the game returns "light ios on" so i want the arduino to get that message and switch the LED on.

 

same for landing gear, HUD-interactions etc.

 

 

my further ideas are to put a raspi in the box with an touchscreen.

raspi and arduino will be connected together, but the arduino is connected to the PC as joystick.

 

so if a information comes from the game to the arduino, so it can send it to the raspi to display it on the touchscreen.

 

so as for example, if i switch the frontshield to full power, the game responds this action, if its really powered up to full, and gives it to the arduino and it sends to the raspi, which can show this through a graphic.

 

further examples:

in future, the ship will have extended controlls about sensor, weapons and so on, i think about retaliator or endeavor.

so i can have additional infos shown on the touchscreen, which are not shown on the screen in the cockpit.

 

so i can control more than i see ingame.

 

would be nice, to get response here. thanks.

Link to comment
Share on other sites

Those are some great ideas but you might want to post this question on the Star Citizen forum. I doubt if your going to find someone here who is fluent with the ability of Star Citizen to export data relative to the interior status of a space ship. DCS is unique in that it exports all kinds of info regarding the cockpit status. I don,t know if any of the space sims actually do that. Even if they did it would still require someone to write software to interact with it. Fortunately we have a brilliant programmer who was able to write software to make that connection but it only works with DCS.

 

You might want to look at voice command software though. The idea of saying "Shields Up", "lock phasers" and "fire" would be a really neat way to interact with the sim.

 

Good luck with your search.

Regards

John W

aka WarHog.

 

My Cockpit Build Pictures...



John Wall

 

My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing

 

 

WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram,



AIO Water Cooler, M.2 512GB NVMe,

500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display

VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals

Link to comment
Share on other sites

  • 4 weeks later...

Hello Everyone

 

the problem that i had with my simulator is that i was needed several joystick input because i wanted to simulate several airplanes all the joysticks was the same name (C.V.P Joystick) and that cause me problems of the game getting confuse i finally dedicate the time to learn linux and succeed to change the name of the joystick (joy1, joy2 etc...) but now i am facing another problem, even the joystick name is different under properties of every joystick it still say "Controller" and now i have 5 joystick with diffrent name but all of them inside say "Controller" i was looking all over to change it and can't find it

Please help me where i need to go t change it ? which file and folder ?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Great mod and thanks Overpro. My old joystick card died on me and your mod and a Mega saved me. Pedals back in business again.

 

only issue I had was that I initially used a 32 bit win7 for the configuration . Config and firmwareload was successful but my win7 -32 refused to find the downloadble driver for the Mega. After plugging it into the simPC (64bit), all works great.

 

Cheers

Gus

- - - -

Link to comment
Share on other sites

Hello Everyone

 

the problem that i had with my simulator is that i was needed several joystick input because i wanted to simulate several airplanes all the joysticks was the same name (C.V.P Joystick) and that cause me problems of the game getting confuse i finally dedicate the time to learn linux and succeed to change the name of the joystick (joy1, joy2 etc...) but now i am facing another problem, even the joystick name is different under properties of every joystick it still say "Controller" and now i have 5 joystick with diffrent name but all of them inside say "Controller" i was looking all over to change it and can't find it

Please help me where i need to go t change it ? which file and folder ?

 

Hi Oresther,

I don't think the code hardcoded the controller name to "Controller"

Please can you let me know where you changed the code and also provide a screen shot indicate the issue you encountered?

 

Thanks

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...

THanks and help needed overpro

 

Hello overpro..thank you very much for your contribution towards our hobby..you have my respect sir..

 

im currently follow all the post here and wanted to do some panel using your awesome sketch and hex files..

 

so i have donloaded your sketch on page 15 post#150 and when im try to verify im having this error

 

========================================================

C:\Users\ADS FARIDYAN\Desktop\button box programing\CVP_JoystickController\CVP_JoystickController.ino: In function 'void loop()':

 

CVP_JoystickController:136: error: 'PORTA' was not declared in this scope

 

PORTA = ~( B00000001 << rowid);

 

^

 

CVP_JoystickController:148: error: 'PING' was not declared in this scope

 

colResult[1] = (PING & B00000100 ) == 0 ? 1 : 0;

 

^

 

CVP_JoystickController:155: error: 'PINL' was not declared in this scope

 

colResult[4] = (PINL & B10000000 ) == 0 ? 1 : 0;

 

^

 

CVP_JoystickController:310: error: 'PORTA' was not declared in this scope

 

PORTA = ~(0x1 << rowid);

 

^

 

CVP_JoystickController:314: error: 'PORTA' was not declared in this scope

 

PORTA = 0xFF;

 

^

 

CVP_JoystickController:326: error: 'PING' was not declared in this scope

 

colResult[1] = (PING & B00000100) == 0 ? 1 : 0;

 

^

 

CVP_JoystickController:333: error: 'PINL' was not declared in this scope

 

colResult[4] = (PINL & B10000000) == 0 ? 1 : 0;

 

^

 

CVP_JoystickController:376: error: 'PORTA' was not declared in this scope

 

PORTA = 0xFF;

 

^

 

CVP_JoystickController:387: error: 'PING' was not declared in this scope

 

colResult[1] = (PING & B00000100) == 0 ? 1 : 0;

 

^

 

CVP_JoystickController:394: error: 'PINL' was not declared in this scope

 

colResult[4] = (PINL & B10000000) == 0 ? 1 : 0;

 

^

 

exit status 1

'PORTG' was not declared in this scope

 

This report would have more information with

"Show verbose output during compilation"

option enabled in File -> Preferences.

 

========================================

 

what can i do to fix this problem so i can upload it to my arduino

 

 

 

and do you have the sketch for uno R3? with 6x6 matrix?...thanks alot for your help

 

im looking forward to your reply

 

regards

lilted86

Link to comment
Share on other sites

Make sure you select the Arduino Mega 2560 under "Tools" -> "Processor" before hitting that compile button. The error you are seeing will appear if you try to compile the sketch for another microcontroller that does not have the same features as the Mega 2560. If it doesn't even find the PORTA register, you probably tried to compile for something with an entirely different architecture (ARM instead of AVR).

Link to comment
Share on other sites

Ian;2876440']Make sure you select the Arduino Mega 2560 under "Tools" -> "Processor" before hitting that compile button. The error you are seeing will appear if you try to compile the sketch for another microcontroller that does not have the same features as the Mega 2560. If it doesn't even find the PORTA register' date=' you probably tried to compile for something with an entirely different architecture (ARM instead of AVR).[/quote']

 

THanks for the reply bro..ok will try tomorrow..yeah i guess mistakenly choose for arduino UNO..so the code cant use with UNO R3?

Link to comment
Share on other sites

so the code cant use with UNO R3?

 

Not as is. It assumes it is running on a Mega 2560 and expects those 64+ I/O pins (and their associated internal registers) to be there.

 

As far as I know, you could use the same principle with the Uno (the Uno also uses an ATMega16U2 for the USB to serial conversion), but you would have to rewrite the sketch to only access I/O pins that are present on the Uno.

Link to comment
Share on other sites

Ian;2877076']Not as is. It assumes it is running on a Mega 2560 and expects those 64+ I/O pins (and their associated internal registers) to be there.

 

As far as I know, you could use the same principle with the Uno (the Uno also uses an ATMega16U2 for the USB to serial conversion), but you would have to rewrite the sketch to only access I/O pins that are present on the Uno.

 

 

Thanks for the info and help bro.

Link to comment
Share on other sites

Hi guys, i'm tryng to develop by myself a steering wheel with a mega 2560 R3 and i've found this post that can help me to di it more easily.

 

I've read all this discussion and certainly i can allow to work my arduino as a steering whell (pressing buttons encoders and so on...), but i can't find anything about receiving data report from the PC.

 

Can anyone help me to send reports from PC to arduino and how i have to modify the firmware??

Link to comment
Share on other sites

  • Recently Browsing   0 members

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