Or "save to device" a new "joystick" profile in MMjoySetup?
If you create a profile, e.g. with 1 button, "save to device" , test. etc, and then change for 10 buttons and nothing more and "save to device", the Windows will not detect, because the VID/PID has not changed, so you need clear the previous entry in windows Register.
Anyway in this case games recognize the change, the issue is only with the obsolete Windows Game Controllers.
Inline advert (2nd and 3rd post)
#4552271 - 01/14/2105:01 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
Or "save to device" a new "joystick" profile in MMjoySetup?
If you create a profile, e.g. with 1 button, "save to device" , test. etc, and then change for 10 buttons and nothing more and "save to device", the Windows will not detect, because the VID/PID has not changed, so you need clear the previous entry in windows Register.
Anyway in this case games recognize the change, the issue is only with the obsolete Windows Game Controllers.
Yes, so it worked the first time so i could test a button. Then i added more buttons and tried to save to device. I have even tried starting the boot loader etc. So the CMD screen opens, the process runs, but it does not reflect the changes
#4552297 - 01/14/2106:43 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
Hello I'm new here, I'm trying to build a button box and have some questions. First, can I add more button and shift regester later? I mean after I programed the button box? Secound, I found a photo from 74HC165 shif regester PCB, since I have no accses to outside of my country I must build that PCB using prototype boards. I found out that there are some resistors between input of each SR and 5v line. Is that correct? Why should use a resistor there? Third, Can I program off buttons? I mean when I press on sth happens and when I press off sth else happens
Last edited by Dovahkiin; 03/27/2106:33 PM. Reason: Adding a Picture of 74HC165 PCB
#4562288 - 04/02/2105:37 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Dovahkiin]
Hi Dovahkiin I am not an expert, but I’ll try answer you.
Originally Posted by Dovahkiin
First, can I add more button and shift regester later? I mean after I programed the button box?
Yes, you’ll have to reprogram your arduino board by Mmjoy software (very simple). Of course there might be a need to resolder some pins (especially 5V and GND) to connect shift register board, that’s why bear in mind to add extra connectors if you plan developing.
Originally Posted by Dovahkiin
Secound, I found a photo from 74HC165 shif regester PCB, since I have no accses to outside of my country I must build that PCB using prototype boards. I found out that there are some resistors between input of each SR and 5v line. Is that correct? Why should use a resistor there?
If I remember correctly, resistors should be placed onto PCB to makes it working properly, there is some discussion in this topic, but I can’t believe you may not buy 74HC165 shift register from aliexpress like this I use it, easy to connect and works fine.
Originally Posted by Dovahkiin
Third, Can I program off buttons? I mean when I press on sth happens and when I press off sth else happens
I’m not sure, Mmjoy software gives possibility to set different ways of buttons operating but probably not as you need. To do so, I use external program like JoyToKey or Gremlin Joystick, anyway you can try set desired button in “Switch mode”, will see.
Last edited by tailor; 04/02/2106:21 PM.
#4562294 - 04/02/2106:44 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: tailor]
I had a quick look at the pin out of the 74165 and all those pins with resistors are inputs, so I'd guess that they are there to protect the inputs of the chip from accidental over voltage.
For changing the programming of the keys/buttons I'd suggest a program called "AutoHotKeys". That's what I used in my cockpit to program the functions of all the switches/buttons. There are a lot of these programs out there and most are free (this one is).
The Host-System is a Arduino Leonard on MMJoy2. The goal is to build a button box. But somehow something simply doesn’t work.
MMJoy2 is up and running on the Leonardo as I can test it with some simple poti’s.
After some research I think I managed to wire the connection between the Leonardo and the SR NewHope 74HC165 device.
I use this layout
Inside mmjoy2 I configured the SR as shown below.
Following the specifications in https://github.com/MMjoy/mmjoy_en/wiki/Controllers-(compatible-base-boards) I use pin 13 for MISO and Pin 12 for CS.
Assuming that this is correct so far the real challenge (at least for me) seems to be how to connect a simple push button with two connections (or any other sensor) to the sr board.
As the SR Board has six slots the connections have to go into one slot. The first one has a numbering 1-4 and an arrow pin (that seems to connect to vcc). Like this:
My first guess was to connect on wire with slot 1 and the other with GND (on the Arduino). This – as all other combinations I tried -gave no result. For a dummy like me it would be perfect if I could get a diagram like this: https://img.alicdn.com/imgextra/i4/441247242/TB2tcL7jVXXXXb9XpXXXXXXXXXX-441247242.jpg (Obviously without the mainboard connections that are visible on this diagram).
What I am doing wrong?
Thanks for your support.
Best
Janko
PS: I tried to contact the NewHope People but they don’t seem to understand this use case and could not help me. There reply to my request :
We don't understand the technology. We have the goods. You can use it if you see the right model. (Probably a Google-Translate form Chinese)
Janko Jochimsen
#4564238 - 04/14/2104:30 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
Hi I use the same SR (I mean which is mentioned by joch40) connected to pro micro, no problems. I think, arduino Leonardo pinout which you used is probably not correct, try to use this one from wiki. I made you simple connection diagram, but as I wrote in previous post I’m not an expert (in contrast to Sokol, check it please ) . From the other hand, if your previous tests did not burn arduino board, another try shouldn’t be hazardous . Also remember to set switch selector “UP” to mmjoy position.
#4564394 - 04/15/2102:23 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
but I could not find any hind how to properly wire the buttons. The discussion kind of ends as the participants discover that the labelling is wrong, but this problem is fixed.
Thanks tailor for the diagram I think this is actually what I am looking for. I will test tonight and report back with the results. Especially interesting is the idea to the B3 pin in the ICSP block as MISO.
Thanks again
Janko
Janko Jochimsen
#4564473 - 04/15/2108:28 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
Hi, I investigated further and put the wiring exactly like tailor advised. Sadly without much success. I connected one push button in the first slot by the first and the last connector (1 and arrow) but with no result. I also tried to short the wires directly – again no reaction in the MMJoy2 Panel.
The only sign of life I get from this SR is if I put the ejoy / mjoy switch in the wrong position. In this case the buttons from 1 to 24 in the MMJoy2 Panel light up. I think this is the expected behaviour (right?). Therefor I assume that the wiring between Leo and SR is now correct (correct?).
So there has to bs some mystery about how to wire the buttons (or any other idea?)
What to do next?
Any help is appreciated
Best
Janko
Janko Jochimsen
#4564608 - 04/16/2103:47 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
In this case the buttons from 1 to 24 in the MMJoy2 Panel light up. I think this is the expected behaviour (right?).
No, button box in mmjoy button tab should light up only when the real button is pressed, I had the same situation as I made wrong MISO assignment in SR-DATA gap. I have no idea what’s wrong, maybe some thoughts: -make sure that your assignment in SR-CS and SR-DATA gaps is correct -reconnect CS wire to another analog or digital pin -replace SR board and check (you should have two) -connect single button in matrix mode (row/column), reprogram mmjoy, see if it works (leo board is ok) -reconnect CS and MISO to TX(D3) and RX(D2) like in this SR 4021 and pro micro example also you can see the same type of connection here for Leonardo board (photo). Trying to help you, but as I said I’m not an electronic expert
#4564676 - 04/16/2108:10 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
Attached find the button panel. I changed some things compared to the original layout.
CS is now on D7 as I was suspicions that the CS Pin has to be PWM and away from the higher numbers as they might conflict with the ICSP Header. MISO is on B3 (MISO Pin of the ICSP) as tailor recommended.
I also tried to use the ICSP Ground.
I have one push button assigned to the first slot (from 1 to arrow). But I have no resistors or anything like that attached.
No result so far….
Best
Janko
Janko Jochimsen
#4564885 - 04/17/2108:50 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
soooo it was a broken cable after all. Following tailors advice to use the other SR I took everything apart and started completely new and suddenly It started to work. After that it turned out that the first SR is OK but on DuPont wire is broken. Sorry that I made such a fuss, but a least I can confirm that the following configuration works on a Leonardo Board:
After that thing is settled may I ask a follow up question?
Is it possible to connect an encoder to these Shift-Register? And if so how do I wire them. I have read Page 61 (https://SimHQ.com/forum/ubbthreads....uild-your-own-usb-controller#Post4333127) that explains very nicely how to connect an encoder as a Button Matrix. Is something similar also possible on these SRs?
Thank you all for your support great environment.
Cheers
Janko
Janko Jochimsen
#4565043 - 04/18/2106:29 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
There are some points to mention: 1. The lights will not show in the mmjoy2 panel, they show in VB Button Tester and in the Windows configuration but not in the mmjoy2 main button panel. So you might have a correct configuration but miss it because you are looking at the wrong test panel. 2. GND of the encoder has to go into the slot where the signals go. The firtzing in the reference doesn’t shows this as it uses a direct connection. 3. Timer Setting are critical and have to be activated as the signal might otherwise be missed. (The older references show sometimes an on-off-on setting that seems to be gone.). I expect there might be the need for some fine tuning once the SR gets more connections and therefor more “stress”.
I attach the mmjoy2 settings
wire schema.
Thank you all for your support.
Best
Janko
Janko Jochimsen
#4565616 - 04/22/2108:42 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
I make a Button box with 90 buttons (10 rows + 9 columns), in MMJOY works well but in the "VKB Button Tester" a lot off buttons not works (principaly in high numbers <70) , someone works if i change H/W number, but others not works . Any idea?
Last edited by Snagov; 04/23/2104:06 PM.
#4565896 - 04/25/2103:43 AMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
Hello, I built a button box with 128 buttons and 8 axes. I have following problem (I think its a software related problem.) All the button of my button box is recognized with mmjoy software button page.( the page in above pic)
I configured them all as normal buttons in the right section. So far so good.
(This pic is from MMJOY wiki and I use it just for showing sections that I will mention) Then I used joystick germlin (is the spell right? :D) and I pressed some buttons, the program recognized some. But some of them didn't recognized by the program. I opened VKB button test in MMjoy and it didnt recognized the buttons that joystick germlin couldnt recognized. At the same time when I press them, the nummber of the button goes red in the MMjoy button section (pic above). So they have no hardware problem. Then I changed the nummber of button in the right section of pic above and then saved them. I tested it with VKB button test and joystick germlin, both didn't recognized some buttons but they were diffrent button from the first test. I realy hope someone could help me solve this problem beacuse I put a lot of time on buliding my button box.
(I'm using SRs and arduino Leonardo, also I tested both 2016 versions of MMJOY and both had this problem but with diffrent buttons)
Last edited by Dovahkiin; 04/25/2104:00 AM.
#4566238 - 04/27/2101:50 PMRe: MMJoy/MMjoy2 - Set your own USB controller with a cheap Arduino
[Re: Sokol1]
I was hoping to get some help for my new MMJoy2 project.
I'm trying to rewire Suncom F-15 Raptor and I'd like to use existing LED's on the stick, but I'm not sure how to wire them so that they light up when a button is pressed. Is it done in MMJoy2 setup (there are some LED options, but I couldn't find any explanation on how to use it)? I don't think that passing a current through the switch would be a good idea. Just please note that I'll be also including two hall sensors and maybe a couple of potentiometers, so if I need to include a battery for LED's, that would be also fine.
Thanks! (PS, if someone has a Suncom throttle, I'd be intereseted in purchasing it!)