It's a regular button, and you didn't wired it.... I do use one of those but without it's pcb,... I've unsoldered one from an old gamepad.
Ah, yes, I didn't wire it in this picture just because I wasn't sure what to do with it.
Originally Posted by Kbird
My guess is it doesn't need an extra GND wire and all you need is a wire from SEL to a Digital input like A2 ......I think the pushbutton is probably already internally grounded when you push it, just like the Axis pins are.
Find the joystick's DATA sheet online if you don't have it and check it out
KB
I think I tried this once, but it was when I was using crapping cables on a breadboard, so it's possible there was a loose connection.
Do you know if I would I need to add the pin to the Button matrix config within MMjoy2, or will it just get picked up if there's a signal sent to a pin?
The wiki for MMjoy2 gave me the impression that the only way to add buttons was to either use a button matrix or shift register, and I was getting confused because from this button I only have one pin, so nothing to use as a Row/Column.
Also, I assume I would also need a Diode between the button and Pro Micro pin?
Thank you both for your help. I'll check out the Data sheet online and see if that helps clear anything up as well
Any button can be wired Direct ( two pins ) or thru a Matrix and work with MMjoy but either way you need to define the pins in MMjoy. It looks as though for this particular switch to work you may need to go direct instead as it needs a pullup resistor to work with the internal ground ( see below) and thus you may need to cut (scratch off) the traces as suggested and shown by Sokol and Forsaken and solder your own two wires as Sokol shows. Single Buttons do not need a Diode theoretically as they can't Ghost AFAIK, then again it can't hurt either I'm thinking....ie good practice to include. But the Single button is in the Wiki on this page just above the pic of the red PCB with the single button attached to D2 and D3....and it does have the diode...
The breakout board provides five labeled connections. You'll connect these lines to your project or microcontroller:
VCC: connect this to your positive supply (usually 5V or 3.3V) VERT: this is the vertical output voltage (will be half of VCC when the joystick is centered) HORIZ: this is the horizontal output voltage (will be half of VCC when the joystick is centered) SEL: this is the output from the pushbutton, normally open, will connect to GND when the button is pushed (see example code below) GND: connect this to your ground line (GND)
Note that the pushbutton (SEL) is connected to GND when pressed, and open (disconnected) when unpressed. Use a pullup resistor on your digital input so that when it's unpressed, your input will read 1 (HIGH), and when pressed, the input will read 0 (LOW). Many microcontrollers have internal pullup resistors you can use for this purpose. See the example code below for how to do this on an Arduino.
The thumbstick I have isn't quite the Sparkfun one, it's this one: http://www.ebay.co.uk/itm/New-KY-023-Dual-Axis-XY-Axis-Joystick-Module-Thumb-Stick-Arduino-Pic-Arm-Pi/361695634810?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
.. but I think the paths may still be visible and probably the same. I'll check when I'm home.
I might just try and take it off the PCB and solder the connections myself. Might help with installing it on the stick, too.
It's good to know that the matrix is necessary, anyway
I probably should have just given up on getting this push button to work, but I have this problem where once I see the potential for something, I can't quite give up until I get it :P
Last edited by FFLink; 11/01/1709:20 AM.
#4387683 - 11/01/1712:46 PMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: FFLink]
I might just try and take it off the PCB and solder the connections myself. Might help with installing it on the stick, too.
Isolate switch connections from pot' connections is more easy than remove the PCB, pot' restistive trails can be damaged by iron solder heat (specially that cheap pot' used by Chineses).
#4387717 - 11/01/1704:37 PMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: FFLink]
It's good to know that the matrix is necessary, anyway
I probably should have just given up on getting this push button to work, but I have this problem where once I see the potential for something, I can't quite give up until I get it :P
Did you mean it isn't necessary ? or maybe i wasn't clear? you don't need a matrix if you have enough pins available to wire each switch (button) direct , which you may have if all you are wiring is this one thumbstick and a few extra buttons...
KB
Some Images from the Original MMjoy16 Instructions and the pages they came from....
I had not noticed the 1st pic is actually a 2x2 matrix , it was the 2nd pic I wanted FFlink to see , I just included the others as I had saved them in the same Folder.
A few weeks ago I asked about how to deal with more than 6 rotary encoders. I think it was Sokol1 who pointed me to the DSD usb controller.
I have now finished most of my project (I'll post pictures here soon) with 11 rotary encoders, 3 analog axis and a whole bunch of buttons. I ended up using both the DSD controller and the Leonardo board I already had because DSD is not that configurable when it comes to customising input (also I used all 32 button inputs on the DSD!). Same for some of my switches - MMJOY lets you set up 2 virtual buttons for one hardware button that can be triggered during on and off events - that's something that DSD doesn't let you do.
In particular, anyone wanting to build a rotary heavy project should know that DSD only lets you change the polling rate between 5ms to something like 40 or 50ms. It does not let you tinker with timers like MMJOY lets you. So in my case, I have 10 rotaries used for items such as CRS, speed and heading bugs, GPS dials and radio dials - with DSD these work fine because I don't need to turn these dials really fast to cover large ranges of values For the altitude dial though, I need to turn the dial fast and for a while when tuning in something like 35000 ft from zero. In xplane for example, the speed at which the values change increase if the input remains pressed - this is easy to do with MMJOY by setting a timer with something like 100ms, with the timer applied to ON but not OFF. This way turning the dial fast generates one long pulse/button press. With DSD however, pulses are never merged but discrete, ie you get many short button presses. Longer polling time also seem to miss inputs or incorrectly report the direction of rotation of the dial.
In short, DSD is a good way to get more than 6 rotaries, but MMJOY offers a lot more in terms of settings and configuration.
#4388406 - 11/06/1712:11 PMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: Kb1rd1]
I had not noticed the 1st pic is actually a 2x2 matrix , it was the 2nd pic I wanted FFlink to see , I just included the others as I had saved them in the same Folder.
KB
Ah, my wording comes from my misunderstanding of what constitutes a button matrix.
When I said "It's good to know that the matrix is necessary, anyway" what I meant was "It's good to know I need at least two pins for a single button". I guess I thought that would be a 1x1 matrix? lol...
Well I worked on my project at the weekend and it was hard. But I sort of got there in the end.
I had to replace some of my buttons with the smaller ones with 4 pins, and when I was finished I realised I had soldered my cables to the wrong legs... Which was fun reverting :P
I also realised I can't quite use the thumbstick I wanted to use as it's too big, so I've ordered a smaller one without the push button ability xD
All in all, I couldn't get it working due to crappy PCB headers/housing, my lack of a crimp tool and general incompetence on my behalf.
So now I'm waiting for new stuff this week and will try again with renewed vigor
A few weeks ago I asked about how to deal with more than 6 rotary encoders. I think it was Sokol1 who pointed me to the DSD usb controller. ... In short, DSD is a good way to get more than 6 rotaries, but MMJOY offers a lot more in terms of settings and configuration.
A more cheap alternative for use more than 6 Encoders, is use 2, 3... Arduino+MMjoy2.
Originally Posted by FFLink
Originally Posted by Kbird
I had not noticed the 1st pic is actually a 2x2 matrix , it was the 2nd pic I wanted FFlink to see , I just included the others as I had saved them in the same Folder.
KB
Ah, my wording comes from my misunderstanding of what constitutes a button matrix.
When I said "It's good to know that the matrix is necessary, anyway" what I meant was "It's good to know I need at least two pins for a single button". I guess I thought that would be a 1x1 matrix? lol...
"Technically" the scheme for connect only 1 button is a 1x1 matrix because are using the pins reserved for Rows and Columns.
#4388482 - 11/06/1706:46 PMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: FFLink]
I had not noticed the 1st pic is actually a 2x2 matrix , it was the 2nd pic I wanted FFlink to see , I just included the others as I had saved them in the same Folder.
KB
Ah, my wording comes from my misunderstanding of what constitutes a button matrix.
When I said "It's good to know that the matrix is necessary, anyway" what I meant was "It's good to know I need at least two pins for a single button". I guess I thought that would be a 1x1 matrix? lol...
Well I worked on my project at the weekend and it was hard. But I sort of got there in the end.
I had to replace some of my buttons with the smaller ones with 4 pins, and when I was finished I realised I had soldered my cables to the wrong legs... Which was fun reverting :P
I also realised I can't quite use the thumbstick I wanted to use as it's too big, so I've ordered a smaller one without the push button ability xD
All in all, I couldn't get it working due to crappy PCB headers/housing, my lack of a crimp tool and general incompetence on my behalf.
So now I'm waiting for new stuff this week and will try again with renewed vigor
Thanks again, all.
don't worry we have all been there that was me about a year ago when I decided to convert my FLCS and TQS to USB, don't sweat it it's always good to step back and start again check everything....and asking questions here if needed.... pics help ..
I uploaded my minimal footprint 24 button shift register to OSH Park. It is heavily influenced by the SergeyPe design and uses 5 pin resistor networks. I included one decoupling C and pullup Rs on Data and CS, I hope that is enough. There are two versions depending if you want to chain them or not. I will put one in the CH Combatstick, where it should easily fit behind the HAT PCB. Also there should be enough space to mount everything including the JSTs on the same PCB side. If anybody finds mistakes, please tell me and I will correct asap.
Well just to share the outcome, here's my mod made possible due to MMjoy2:
It's just a simple 4 buttons and an analogue stick, but I'm kind of proud and am eager to do more of this sort of thing. I'm thinking a hat on the thumb rest and some tidying up and after that, maybe a control box of some kind...
Cheers again for all of your help
#4391431 - 11/26/1706:47 AMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: Sokol1]
Hello guys... I am trying to solve my problem with MMJoy2. I changed electronics to MMjoy2 in my Saitek TQ. Now I have 3 axes and 3 buttons at 0-5% of these axes. How can I achieve, that I have starting point of axe at 5% of entire range? Why? Saitek TQ have some kind of "endstops" with mechanical stop at 5% and i want to use this for my reverse thrust (virtual button from 0-5% at each axe) and I need to have throtle at idle at 5%... is it clear for you guys? My english is not perfect... How can I achieve this with MMjoy2? Thanks for your advice.
#4391448 - 11/26/1712:14 PMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: Sokol1]
In MMjoySetup, tab Joystick Axes (Spec.Functions), use "Axes to button" - bellow left.
Choose the button number, the axis that will press this button, and the % range you want that axis press this button, example: 0% to 5%, then "Save settings to device".
For this "Special Functions" you can use buttons from #1 to #32. Above # 32 only don't support "Special Functions".
#4391457 - 11/26/1712:53 PMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: Sokol1]
I have already done this... and virtual buttons working well. I try explain more better...
Entire axe have 0-100%, right? I want to 0-5% virtual button (already done) and for rest 95% i want 100% of axis range starting at 5% and ending at 100% of physical range. So:
Physical range / Virtual range 0 - 5 % / virtual button 5 - 100% / 0 - 100%
#4391481 - 11/26/1703:07 PMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: Sokol1]
MMjoy2Setup don't have this option for divide an axis in two other axis. BTW - Something similar is available in VKB NJoy32 firmware, create a "virtual" axis from a physical axis.
But some "flight simulators" allow you set the initial position of throttle axis, or maybe if use DView, DTweak 2 calibration...
#4391990 - 11/30/1708:29 AMRe: MMJoy/MMjoy2 - Build your own USB controller
[Re: Sokol1]