Jump to content

an Arduino USB HID controller, composite USB controller


overpro

Recommended Posts

Hey guys, I know this is somewhat of a dead thread, but I have a question that I hope someone might be able to help me with.

 

I've build a button box using overpro's excellent software and a mega. Everything works, *except* that windows identifies the two devices as a VPC Mongoose. I recently became the owner of the same, and having 3 input devices with the same labeling seems ridiculous. I'm not sure where windows got this idea, but it's pretty resistant to my attempts to change it. I've even gone as far as to reflash the hex file. I assume this is a case of Windows finding a certified driver file that it thinks is a good match, and insisting on using it. Any thoughts?

 

I'm getting exactly the same device ID's as you are. I have a T-50 as well. The only saving grace is that they all have different numerical ID's so when you open the options page you can tell them apart. Not yet sure if they can be modified. But I haven’t given up . Will post solution if there is one.

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

  • 1 year later...

These (Ebay US $1.86) 4x4 + 4xtra buttons (+8 led’s) microbutton pads are possibly suited to be made in MDI buttons (landscape 4rows x5buttons),

 

3 of these make 3*20=60 buttons

 

https://alexnld.com/product/8-led-4-x-4-push-buttons-matrix-keypad-16-key-switch-keyboard-for-arduino-avr-arm-stm32

 

https://www.ebay.com/itm/4x4-Keypad-Matrix-Keyboard-Module-16-Buttons-Mcu-LED-For-Arduino-DIY-Smart-Car/201967003312?var=501979887449

 

So, I could buy 3 of these = 60 buttons (3x4*4 and 3x4), an Arduino (Mega2560R3), and with an adjusted (Linux?) “256 joystick button” Arduino sketch I can plug an Arduino USB in, and have 60 additional button in DCS?

 

Errr, how could that be accomplished, could anyone explain this in somewhat kindergarten English?

 

- I can solder and copy paste Arduino .ino in the IDE and made the USB interface for a Logitech race wheel shifter

- I am on a Windows PC


Edited by majapahit

| VR goggles | Autopilot panel | Headtracker | TM HOTAS | G920 HOTAS | MS FFB 2 | Throttle Quadrants | 8600K | GTX 1080 | 64GB RAM| Win 10 x64 | Voicerecognition | 50" UHD TV monitor | 40" 1080p TV monitor | 2x 24" 1080p side monitors | 24" 1080p touchscreen |

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...

Hi Overpro.

Nice work of yours!

I even made three setups and they all work great but.... they all are called the same, so from time to time my Pc goes mad and shuffle the joysticks around so I have to reassign or unisntall and reinstall all three and see iif they are reassigned correctly, or restart all over again until they match the previous configuration. A nightmare!

So, I did try all the thinks I can imagine (no programing knowledge, whatsoever), managed to change name in "descriptors. c", and came to a stop when compiling. I did try (with the help of a relative) all the compiling tricks we could, including what Lilted86 (thread n 234 and 235 did) and nojoy!

So, could you help me with some detailled instruction, or even better, can I send you the package with the changed names and you do the compiling?

Thanks in advance and I ll be waiting for your answer.

Sacarino111

Link to comment
Share on other sites

Wow, Thanks

I'll try. Right now, I'm overwhemed, and trying to fully understand this app U linked to me.

Again, thanks a lot.

I'll tell my tale!

 

 

+1 to the Leo Bodnar cards. Each card is recognized in windows with a unique serial number. This prevents windows from mistaking box 1 for box 3 or box 2. They are a little more expensive but in this case they are worth it.

 

No potentiometers use BBI 32 or 64

Yes potentiometers use BU0836 series card.

 

 

Sent from my iPad using Tapatalk

Link to comment
Share on other sites

OK I really like the idea of this joystick and am trying to compile the code so I can change the name.

 

1. Setup a Virtual Machine using Hyper-V to run Ubuntu 18.04.4

2. Installed the software: "avr-libc", "make" and "build-essential". Not "c-compiler" because it gives me a long list of choices and I don't know which one to pick and there is already a compiler installed in the default version of Ubuntu 18.04.4

3. Downloaded the source from github and the recommended version of the LUFA library (130901) and placed it in the "ArduinoUSBJoystick" folder.

4. I have also edited "Arduino-joystick.h" (in /ArduinoUSBJoystick/firmwares/cvpJoystickTest) to point to the correct LUFA folders (lines 47 and 49-54). It was LUFA/<path> whereas it should be LUFA/LUFA/<path> after extracting from the zip file. The same with "Descriptors.h" for lines 42 and 43.

5. Now using a terminal run the cd ~/ArduinoUSBJoystick/firmwares/cvpJoystickTest/ and then 'make' I get the following errors:

 

cvpJoystick.o: In function `SetupHardware':

cvpJoystick.c: (.text.SetupHardware+0x44): undefined reference to `USB_Init'

cvpJoystick.o: In function `Joystick1_Task':

cvpJoystick.c: (.text.Joystick1_Task+0x5e): undefined reference to `Endpoint_Write_Stream_LE'

cvpJoystick.o: In function `Joystick2_Task':

cvpJoystick.c: (.text.Joystick2_Task+0x5e): undefined reference to `Endpoint_Write_Stream_LE'

cvpJoystick.o: In function `main':

cvpJoystick.c: (.text.startup.main+0x38 ): undefined reference to `USB_USBTask'

collect2: error: ld returned 1 exit status

makefile:685: recipe for target 'cvpJoystick.elf' failed

make: *** [cvpJoystick.elf] Error 1

 

Anyone else had to solve this problem before?

 

Cheers

Glyn


Edited by glynd02
Link to comment
Share on other sites

I had the same problem, added the following lane (Ithink, 'cause I made so many changges I m finally lost) in "CVPJoystick.c" :

#include "Arduino-joystick.h"

#include <../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c> !!!!!!!!!!THIS ONE!!!!!!!

 

But I finally got to a different problem:

 

... a,-adhlns=./cvpJoystick.lst -I../../ -std=gnu99 -Wundef -MMD -MP -MF .dep/cvpJoystick.o.d cvpJoystick.c -o cvpJoystick.o

In file included from cvpJoystick.c:63:0:

./../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c: In function ‘USB_ResetInterface’:

./../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c:164:3: warning: implicit declaration of function ‘USB_Init_Device’ [-Wimplicit-function-declaration]

USB_Init_Device();

^

./../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c: At top level:

./../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c:190:13: warning: conflicting types for ‘USB_Init_Device’

static void USB_Init_Device(void)

^

./../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c:190:13: error: static declaration of ‘USB_Init_Device’ follows non-static declaration

./../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c:164:3: note: previous implicit declaration of ‘USB_Init_Device’ was here

USB_Init_Device();

^

./../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c:190:13: warning: ‘USB_Init_Device’ defined but not used [-Wunused-function]

static void USB_Init_Device(void)

^

make: *** [makefile:694: cvpJoystick.o] Error 1

pi@Sacarino111:~/ArduinoUSBJoystick/firmwares/cvpJoystickTest $ ^C

I followed all the lines descibed but got to an end, as I canunderstand, the "static non static" issue. IF any one could help us,it would be much apreciated.

Cheers, sacarino111

Link to comment
Share on other sites

I had the same problem, added the following lane (I think, 'cause I made so many changes I m finally lost) in "CVPJoystick.c" :

#include "Arduino-joystick.h"

#include <../../LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c> !!!!!!!!!!THIS ONE!!!!!!!

 

No that did not work for me Sacarino111 - got some errors like you.

 

Well I have uploaded the original to an Arduino Mega and it is showing up as 2 x 128 buttons and stuff :)

 

attachment.php?attachmentid=231565&stc=1&d=1585942156

 

Just need a C coder to have a look at the compiling issue, got the local Makerspace on the job hopefully.

 

Onto making the matrix next...

 

Cheers

Glyn

Joystick-test.png.0cd2d228ac89cec5815ca105692a8641.png

Link to comment
Share on other sites

Well, yes. I also got syuck at compiling!

Tryed almost everythink I could imagine, but it's like a link, or path inside a file is wrong.

The only think I can imagine is yhat the Lynux version I'm using is not the same (in time) so they have some different behavior. Looking to install Ubuntu 9.10 on a raspberry Pi and isntall the compiler of the same era and do some tryouts. I'll keep U infomed.

By the way, if U need any hepl on making the matrix, I already did it three times, so I can give some turnarounds or ideas. Feel free to ask me!

It's an impressive solution, really, and when you'll make it work, you 'll be amazed by the results.

Bye


Edited by Sacarino111
Link to comment
Share on other sites

For the matrix, I found the easyest way to use those small protoboards. Connect all the "row" pins to one side of the Prot and all "columns"to the other side, and U'll have 4 pins for each row or column, that U can split later to accept more inputs.https://www.conectrolinformatica.com/arduino-accesorios/3464-placa-protoboard-mini-de-170-puntos.html:

Look at this https://www.conectrolinformatica.com/arduino-accesorios/3464-placa-protoboard-mini-de-170-puntos.html


Edited by Sacarino111
Link to comment
Share on other sites

Thanks for the info Sacarino :) Just working on some 3D models of instruments for the Harrier at the moment. Love Deadman's MPCD Shapeways model (https://forums.eagle.ru/showpost.php?p=4176862&postcount=1577 and here https://www.shapeways.com/product/8K6HDPANL/f-18-mpcd-avab) but I can't afford it at the moment due to a situation beyond my control.

 

However I have a 3D printer so I am going to build and print my own - plenty of time but no cash lol

 

Cheers

Glyn


Edited by glynd02
Link to comment
Share on other sites

  • 2 weeks later...

I use two Thrustmaster F16 mfds, wich are perfect for the task, and I made a third one with "123 design", close to the shape of the center F18 MFD. I can share the model of it with U, as I 3d printed it (not at home, no 3d printer yet). It has some things that could be made different, but it was my first and only try.

Cheers

Link to comment
Share on other sites

I really Hope someone can help me out here, I have been trying to get past the atmel flip part of uploading the hex file.

 

I have the mega entering in DFU mode, after resetting the two pins it comes up as another USB device in device manager. But when I try to flash with the atmel FLIP tool I get a "AtLibUsbDFU.dll" error. I have tried to install the driver @"C:\Program Files(x86)\Atmel\usb\atmel_usb_dfu.inf" but I receive an error that "the folder you specified doesnt contain a compatible software driver for your device. make sure its designed to work with Windows for x64 based systems"

I have tried using avrdude as well but cant seem to get the command right.

 

I have also tried to use another arduino as ISP, but had no luck getting that to work.

 

I also tried to follow a tutorial to flash the stock firmware to ensure that i had DFU mode on the 16u2 but this did not work either. arduino forum tutorial. i figured if i could get that to work then maybe i could get the hex file loaded for this. But of course no luck.

 

I am completely stuck and banging my head against my desk.

 

I have taken some screenshots, If anymore are needed please let me know id be happy to try anything at this point.

 

before reseting pin to go into DFU mode

l8iHInB.png

 

after restting the pins to put in dfu mode

fwvI0Yh.png

 

once "i think its dfu mode" trying to use atmel flip this is the eroor

HnOWaEE.png

 

when i try to solve the error in atmel and install the driver for the mega

VubuHiD.png

Link to comment
Share on other sites

Hi Bacon...

I think the address for the Atmel driver you entered is wrong, or you made in an incorrect manner. Let me check how I did it "back then when"... and I 'll tell U if U did it right or not.

Cheers,

Sacarino111


Edited by Sacarino111
Link to comment
Share on other sites

Hi, Bacon8or.

I checked my system, and I'm not sure, but your path doesn't look correct, at least to me and my instalation:

You typed

@"C:\Program Files(x86)\Atmel\usb\atmel_usb_dfu.inf", but for me it should be

@"C:\Program Files(x86)\Atmel\Flip3.4.7\usb\atmel_usb_dfu.inf". I can't tell if that's the problem, but give it a try!

C U,

Saca111

Link to comment
Share on other sites

Hi, Bacon8or.

I checked my system, and I'm not sure, but your path doesn't look correct, at least to me and my instalation:

You typed

@"C:\Program Files(x86)\Atmel\usb\atmel_usb_dfu.inf", but for me it should be

@"C:\Program Files(x86)\Atmel\Flip3.4.7\usb\atmel_usb_dfu.inf". I can't tell if that's the problem, but give it a try!

C U,

Saca111

Sorry That is the same directory as I have it(must have missed that, was rather frustrated yesterday tryin to get it to work),

I will whip up win 7 on a machine and try it and ill make it win 7 32 bit to even better my chances.. I did try to run it in compatibility mode but that didnt help.

Link to comment
Share on other sites

Well, No Luck with win 7 either. At this point I am just going to purchase another Mega. I have no problem with having more arduinos, and just gonna try with a fresh board, its the only thing I havent tried, I would try with a uno but dont have unos, I got nanos thru the roof but that contains different chip. So hopefully a nice fresh mega 2560 r3 will get me there, I jsut want to avoid having to use multiple leonardo/micros for my panels.

Link to comment
Share on other sites

Hi, Bacon8or, I did mine on a Win 10 PC.

 

The path to the atmel driver file should be here C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf.

 

You must install 3.4.7.112 from here:

https://www.microchip.com/developmenttools/ProductDetails/flip

 

I used the one with the JRE built in (FLIP 3.4.7.112 for Windows (Java Runtime Environment included))

 

I have attached pics of the 6 steps to flash the hex file and the hex file I used.

 

Cheers

Glyn

01.png.2ccf904f0a0aaf51b5e42f2e00e48c62.png

02.png.fe3f8bfc146080b137626d844a2087db.png

03.png.b5f2422df6b50d78f0620315e78d9a5a.png

04.png.bd71bc15a362ce3f4d2657cad3b7a48d.png

05.png.bcbd25e3a8aa778662fe3f05e4820468.png

06.png.8d81c2999ad894f2b2166e51ce75d327.png

cvpJoystick 2013-Nov-29.zip


Edited by glynd02
Link to comment
Share on other sites

Hi, Bacon8or.

I'm sorry this didn't help.

If what glynd said doesn't work, I suggest U:

1 buy a new one, be sure U can put it on DFU mode

2 Upload the arduino sketch, put it on DFU mode

3 INSTALL the drivers from FLIP 3.4.7 first. On your first reply, you didn't mention that part. Unplug it

4 Plug it back

5 once it's recognised on your system, then follow the instructions glynd wrote above.

6 Unplug, plug it back. It shoud do.

Saca111


Edited by Sacarino111
Link to comment
Share on other sites

Hi, Bacon8or, I did mine on a Win 10 PC.

 

The path to the atmel driver file should be here C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf.

 

You must install 3.4.7.112 from here:

https://www.microchip.com/developmenttools/ProductDetails/flip

 

I used the one with the JRE built in (FLIP 3.4.7.112 for Windows (Java Runtime Environment included))

 

I have attached pics of the 6 steps to flash the hex file and the hex file I used.

 

Cheers

Glyn

 

Thanks for everyone's Help, SOOO I found out my problem all along was this mega didnt have DFU MODE. So I used Hoodloader2 which has an installation sketch to be able to write hex files. I used this to the write, and make sure DFU mode was possible. Once I did this, and plugged the mega in it then showed up in device manager under atmel and device was 16u2. thus getting rid of my error in FLIP. and thus being able to write that hex file!!! and ill be damned if now I dont have a cvp joystick in my devices!!!

 

xI4j7wK.png

 

one other question tho is that when I checked the controller in devices and printers. one of the 2 joysticks has a bunch of buttons and axis' that are showing being hit/moved. I have nothing hooked up to the mega right now...any ideas?

ntlQAaS.jpg

is it only meant to be used with a Button Matrix? looking at the arduino code. it shows pins 22-37 as outputs and 38-54 as inputs.


Edited by bacon8tor
Link to comment
Share on other sites

  • Recently Browsing   0 members

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