My god there is so much useless info on here about this. Finally a video that simply explains the matrix on arduino and WHY
@uhN0id4 ай бұрын
This is the best explanation on how and **why** a button matrix works. I was so confused as to how the controller could know which button was being pressed in other videos I've watched. Thank you!
@coltius3 жыл бұрын
Great video. As someone who is pretty much clueless about Arduino but who wants to build his own button boxes and things this was really helpful.
@Jerichoom3 жыл бұрын
this video tut deserves significantly MORE likes than it has right now! Excellent description, thank you very much.
@Snugggg3 жыл бұрын
this is fantastic! exactly what i've been looking for. I been trying to reduce the number of USB devices. they become more and more unreliable the more i plug in. this gets around that perfectly.
@wayneshephard10 ай бұрын
Still come back to these years later :)
@Jackg1822 Жыл бұрын
i was wondering if you could make a quick video or link one on how to program the joystick library to have more than 32 buttons.
@pastorhudson Жыл бұрын
I'm watching a ton of Button box / matrix videos as I plan to build my own Truck Simulator button box. Your video is fantastic, and your configurator is awesome too! Thank you for all the work to contribute this to the internet hive mind!
@TonyHA913 Жыл бұрын
It is an interesting way for sure, but you can also use multiplexers and not go through this complex soldering matrix, i built a dashboard for ETS2/ATS with many buttons/encoders using couple of multiplexers and a pro micro.
@Dutch3DMaster7 ай бұрын
@@TonyHA913 While I understand the approach, it does make troubleshooting a lot more difficult, because you are introducing wiring and an extra part to the setup that can malfunction (let's say because of a wrong connection somewhere). This is probably one of the most straightforward approaches to multiple buttons on a reasonably small amount of pins, next to going for a massive amount of IO on something like an Arduino Due which is in my dashboard for ETS2 and bussims.
@dorjedriftwood273112 күн бұрын
Is there not an issue where if you push a1 and b2 that accidentally include b1 as an input of the micro controller reads that column B and row 1 are simultaneously activated. How does the controller not include every input in the two categories? Don’t you need some sort of individually plus or voltage or add an extra layer that allows so,e sort of logic to understand only two buttons are being pushed not four? This isn’t rhetorical I am not good at this stuff but know enough to understand this sort of issue, just not enough to fix it. I know keyboard controllers use this sort of mapping but what I have seen from them is that they are much more maze like in the matrix. Again without an individual signal pulse or voltage made by some sort of resistor how does the controller not add any button connected between rows and columns when combinations are held.
@real_robots11 күн бұрын
@@dorjedriftwood2731 only one column is energised at a time, and the doors prevent any ghosting. So no, that's not a problem, you can mash the buttons however you want and only the ones you press will trigger.
@wardker3 жыл бұрын
Awesome demo. Looking forward to see more. Could you tell me (a noob) what kind of diodes you use? A specific partslist would be helpful for those, like me, who are learning from zero background and also want to try what you make. Thanks and keep them coming.
@real_robots3 жыл бұрын
Sure, I didn't really bother with a parts list on this because you could use almost any diode and buttons. I used 1n5819 SS14 diodes which are way overpowered for this use, but they're what I had lying around. Any diode that can handle 5v (double it for safety to 10v) and you'll be fine as the current passing through is negligible.
@wardker3 жыл бұрын
@@real_robots Thanks a lot. Again, a very instructive video. Subbed!!!
@Enigma758Ай бұрын
00:18 You really should specify a pullup or pulldown resistor a, otherwise the input is floating when the button is not pressed.
@real_robotsАй бұрын
@@Enigma758 that's true, I could have mentioned it. In the context of using an Arduino pro micro you don't need to add one as the pull-ups are built in
@shibiwowsawesomegaming478311 ай бұрын
How would you be able to apply this to an actual button box, like mounting them inside the junction box as there doesn't seem to be any mounting points on the buttons, like there is on switches and rotaries with the washer and nut.
@Scoobydcs7 ай бұрын
i currently use several leo bodnar boards which are greeat but iv got too many switches. can i use a matrix with the leo boards? also i have several variable pot and rotary encoders too and also 8way hats and momentary buttons. how do i deal with them?
@mitchclarke194 ай бұрын
does using a matrix introduce any additional latency, compared to wiring each button directly to its own pin? (like by having to run the rows/columns check) (for my project I'm planning on using 30 buttons, if that's relevant, for a project where minimal latency is ideal) or if there are any other trade offs that might warrant searching for additional input pins over using a matrix?
@real_robots4 ай бұрын
doing a matrice will always be slower, but when I tested it with 128 it was still good to me. The only time I got to latency I could notice was when I had that many on a subdevice, so i had to wait for the matrix to be read, then passed to the master device, then passed to the computer. 30 buttons you should be golden
@mitchclarke194 ай бұрын
@@real_robots thank you!
@ralph_f16simulator2 ай бұрын
Hi, I have a unit called a CPD in my simulator cockpit. The unit has a build in matrix Cann i connect the columns and rows directly to a Bodnar board?
@cammy9r22 күн бұрын
There are a few bodnar boards for sale, which one are you talking about? The BU0836A can accept a 6x6 matrix with 4 of these inputs dedicated as a hatswitch.
@SirioAstarot3 күн бұрын
How can you tell if the Arduino pins are rows and not columns, how can you identify rows and columns on Arduino boards, it's all very confusing.
@Delorean29 Жыл бұрын
I need Atiny85 8 pin & DF player & 20 button for 3 cables input. Atiny85 is enough?
@real_robots Жыл бұрын
If you want to do 20 buttons you need a minimum of 5+4 GPIO pins. Not sure what you mean by 3 cables input. The Attiny85 has 5 GPIOS, so the biggest button matrix you could do would be 2x3, so 6 buttons total. You could use a gpio extender on it but you're probably better off just using a different MCU if you need 20 buttons.
@ciri1512 жыл бұрын
Hi, I got some questions if you don't mind :) I'm using a arduino leonardo. To what pins should I connect the rows and columns? Should the rows be all ground, and the columns digital in? And what about the voltage? Does it not need a v5 connection? Thanks in advance!
@real_robots2 жыл бұрын
Hi, you can connect the rows and columns to any of the digital pins on the Leonardo. If you're doing individual buttons you connect one pin to your digital pin and the other to ground, you don't need a 5v connection if you set the pin in pull-up mode in the gui If you're doing a button matrix though, you do it just like I. My diagram, all columns and rows are digital pins. My software switches the pinmodes to automatically set them to 5v/gnd/input as needed to read them each in turn
@ciri1512 жыл бұрын
@@real_robots thank you!
@MarcBeberan7 күн бұрын
Hey there. I found this video about 1 week back. Have built a button box myself with a pro micro the buttons are arranged in a matrix, the potentiometer is separately connected. well i have uploaded the rr_controller firmware on to my pro micro, have connected succesfully to rr_configurator in the past, but now i can't connect. am always getting handshake timeout. i have uploaded the firmware a dozen times now but it doesn't work. HELP me D
@real_robots6 күн бұрын
@@MarcBeberan weird, I've had connection errors before, usually disabled by resetting the device or unplugging it and plugging it back it. I haven't looked at this code in a while and Arduino updates might have killed it. Is it showing up in your game controller list at least?
@MarcBeberan6 күн бұрын
@@real_robotsi have triedto use code from chatgpt to run the bitton box, no success. Then i uploaded rr_controller firmware again and this time could connect to rr_configurator. Idk why reuploading the firnware hasn't worked before. No problems now. Before i had the issue that not every button was recognized in control panel because i am using 4x6 matrix and also put it in in rr_configurator like that. Then i read on the gitlab issue site for rr_configurator, read it doesnt like unsquare matrixes, so i put in 6x6 matrix and it works perfectly. Thx tho for the rather fast reply.
@dunklerKurfurstDesDeepstat Жыл бұрын
thanks mata, thats exactly what i needed
@ED209no5 ай бұрын
Hello RR. I really hope you will read this, cus I really need some help regarding rr_configurator. 😅 I have managed to do everything as shown in your video, and almost everything is working, except for row 5 (I have made 4x5 matrix setup, 20 buttons). In rr_configurator I can see the buttons in row 5 being pressed, but in Windows game controller settings, these buttons doesn't show as pressed. I've tried to switch places with the wires, and its only row 5 that doesn't show. So I'm almost certain it's not a hardware issue. Is this something you could help me sort out? Btw I've made a collective stick with 20 buttons, one potmeter (for zooming in DCS) and a hall effect sensor for the collective. rr_configurator has done an excellent job setting up the potmeter and the hall effect sensor. 😊👍
@donpera3654 Жыл бұрын
ingeniero una pregunta como le asigno los números y caracteres a los botones en la matrix configurador gracias de antemano y si funciona por usb también
@atifahmed60369 ай бұрын
Can u help me figure out a way to do 12 buttons but only using 1 adc pin, and having a separate resistor for each button
@astonishing-a6 ай бұрын
Help, please - Issues with my matrix setup. All buttons work 100% as expected in the RR Configuration but, Windows is only seeing the firs 2 buttons from each row - even though I can see all the buttons responding in the RR Config panel, windows refuses to see them. Using firmware 7 on both a Leonardo and Pro Micro with same results. (5 columns 2 rows currently in my test setup). I'm trying to make a controller for a disabled person and would hugely appreciate any help here, thanks!
@real_robots6 ай бұрын
Try making it 5 columns and 5 rows (just pick an empty pin and assign all the extra rows to that) There's a bug sometimes screws up uneven matrices
@astonishing-a6 ай бұрын
@@real_robots Right, SOLVED. Thanks for the fast reply and super useful bit of software, I see me getting a lot of use from it in the coming years 🙂 This is for others that my find this issue and hopefully save them a bit of time: For anyone having issues with a non-square matrix (different amount of columns and rows), the matrix will not function correctly in windows as a game pad. You need to make the matrix square (same amount of columns and rows), to do this and not waste pins on it, just fill in the configuration duplicating columns and rows pins that are already in use (don't set any buttons up on those lines if you don't physically have any).
@fedorkarpov74442 жыл бұрын
This is exactly what I was looking for, thank you
@rogerlee34358 ай бұрын
I hope you can help. I'm trying to use the project and want to flash the firmware ready for the matrix when I've finished it. I'm using QMK Toolbox and my Spark Fun Pro Micro. Caterina is connected but when I try to flash I get a message 'File does not exist'. The file copied from Github does not have an extension but I've tried adding .hex and .bin. Same result. Am I doing something wrong? Do I need to paste the file somewhere else first? Your help will be much appreciated.
@erykfear268920 күн бұрын
Hmmm i did iti but i have 3x4 matrix and in your software everything is work, showing 1 and 0 but in Game Controller one row is showing presing button.
@real_robots20 күн бұрын
@@erykfear2689 ah, there's a bug somewhere in my code that bollockses it up if the matrix isn't square. Try making it 4x4, just assign the extra column to any empty pin
@OgioniBH2 ай бұрын
Good evening my old friend, Can you tell me if rr_Configurator would recognize a hall sensor?
@real_robots2 ай бұрын
@@OgioniBH if it uses a pwm signal, yes.
@Snugggg Жыл бұрын
can rr_configurator do rotary encoders? they're kind of a must have for the flight sim crowd. also axis to button - putting virtual buttons along an analogue axis that activate when the slider enters a specific range? many HOTAS have these for "engine shutdown" or "afterburner". it can also be useful for adding multiple buttons via a resistor ladder and only using one input wire (and 5v and Gnd).
@real_robots Жыл бұрын
It does rotary encoders, you can also assign an axis to a button, the buttons only show 0 and 1 but you can calibrate it so 1 will be the axis max.
@danm22862 ай бұрын
Question: the gitlab says that the ESP32 can be Bluetooth only. Does this mean that you can’t use the device (once complete) with a usb cable and you have to use Bluetooth to connect it to a pc? HID master devices ATMEGA32U4 (eg. Arduino Pro Micro) ESP32 (bluetooth only, no USB HID)
@real_robots2 ай бұрын
@@danm2286 that's right, the esp32 cant connect has an HID device over USB.
@danm22862 ай бұрын
@@real_robots I am trying to upload the firmware to a esp32 (Freenove ESP32-WROOM Board), and i'm getting this error: "error: #include nested depth 200 exceeds maximum of 200 (use -fmax-include-depth=DEPTH to increase the maximum) 25 | #include " any idea what i can do to fix this?
@ryanwees59182 жыл бұрын
any possible chance you could help me out on a specific project. i have 4 loadcells that i need to use as a 2 axis joystick, and was wondering if you would be willingly to code this such to support the hx711 sensor?
@GreySectoid2 жыл бұрын
Your channel is amazing, so much useful information for this kind of projects.
@markrogers7304 Жыл бұрын
Never seen that software. Ive been using mmjoy2, seems more straight forward for me. Mmjoy2 Looks to have more options for axis,hats,encoders,switches etc...
@Delorean29 Жыл бұрын
Can I use these to wave sound filés effects on micro SD card player??
@real_robots Жыл бұрын
Absolutely, the firmware I include here is pretty much just for setting up an HID controller. If you want to use the buttons for something different I'll link a good tutorial (not mine) below whcih will give you the code you need. www.baldengineer.com/arduino-keyboard-matrix-tutorial.html
@mrai5633 Жыл бұрын
Hello, how to wire 5 rows by 15 column and assign number to each ex. 1 to 75 thanks you
@Mauro-qy6sr Жыл бұрын
Is layered programming possible to use the keyboard for games, writing and macros for example?
@slybunda3 жыл бұрын
can it detect all buttons being simultaneously pressed?
@real_robots3 жыл бұрын
Absolutely, if you use this circuit your will get accurate results no matter how many of the buttons you press at once.
@frankda43 жыл бұрын
If you press the top 2 buttons in the left most column and the top button in 2nd left most all at the same time; then would you not be able to tell if the [2,2] button had also been pressed as well?
@real_robots3 жыл бұрын
If you follow this schematic then only one button is polled at a time, this is done by controlling it so only one column has a positive voltage at a time and only one row is sinking it. (it might have been the other way around).
@skwinged5 ай бұрын
Could the roles of rows and columns be reversed in software if one inverts all the diodes? (From the preliminary analysis it seems that it should work fine)
@real_robots5 ай бұрын
Maybe? Let me know if it works.
@skwinged5 ай бұрын
@@real_robots I think I'll try it first with something like 2x2 matrix. As I want to write a custom soft for it this way my program logic will be much clearer because of the way I want it wired in the final project.
@real_robots5 ай бұрын
@@skwinged Always a good idea to start with a smaller prototype or even on a breadboard first to make sure you've got it right before you go big.
@samadtube2 жыл бұрын
Amazing tutorial, I followed same, but during testing I notice that if we have matrix like 5 rows and 6 columns, than the last columns will not work, it will register on configurator but when I try on windows test for joystick, it will not fire, so I suppose matrix should have equal rows and columns
@real_robots2 жыл бұрын
There's a bug with the configurator, it doesn't like odd matrices. Try adding a 6th on an unused pin
@real_robots2 жыл бұрын
Don't need an actual row, just assign it in the configurator
@be.ants123911 ай бұрын
i constandly get an error saying thatthere is no such file or directory
@powerchill2 жыл бұрын
hey man can you help me out please. So i made 4 x 8 button matrix, everything works well but when i checked in windows or in game, it seems only 4x4 ( half of the button box ) is being registered when buttons are pressed. Windows and games sees that it has 32 buttons but only lets me press first 4x4 square. Is there something i can do about this? configurator works fine and all buttons are mapped. also side question, is there a way to change the name of this usb device ? i want it to be recognized as Button Box in windows
@real_robots2 жыл бұрын
I've had this bug reported, with matrices that they work in the configurator but not completely in Windows. Unfortunately I don't have time to work on the project anymore so haven't gone in to find the bug. Some people have said it only happens with lopsided matrices so I can't do much other than suggest trying going 8x4 or try and make it have even sides. Possibly try assigning some extra columns to pins that aren't connected and see if that bypasses whatever bug I've got. With arduino devices the only way to change the HID device name is through playing with the boards libraries, I've not tried it though so I can't say if it works or not.
@powerchill2 жыл бұрын
@@real_robots alright, thanks for the quick reply man. really appreciate it!
@powerchill2 жыл бұрын
@@real_robots i assigned 4 more rows and it works now! amazing! at least now i know for next time i need to build symetrical button layout haha. Cheers dude! :)
@real_robots2 жыл бұрын
@@powerchill sounds like I just need to write better code. Thanks for letting me know that fix worked
@raycrivello2233 Жыл бұрын
Hopefully this is still active. Is there any reason the "Button matrix" won't see my pins?
@rakeshgupta-nh2hu3 жыл бұрын
We need this type of work engineer which make matrix keypads
@kostasslantzos63553 ай бұрын
is there a specific cable type to use to make this?
@real_robots3 ай бұрын
Nope, there's practically no current so you can use whatever wire you've got, or is easier to work with.
@joshuabduck4986 Жыл бұрын
Man I'm dying here. Im using an ELEGOO UNO R3. I've loaded the firmware (as far as I know) and ive wired everything up but for the life of me I cannot get any response on the matrix. I tried doing a simple switch with pin and ground and that shows up just fine. For the first Row I tried to use PIN 8 and for the columns pin 3,4,5,6,7. I there something Im missing? Is there a video to correctly load the firmware? Is that my issue? I've only tried hooking up 2 rows of 5 equaling 10 push buttons. Also do i need to edit the matrix code before I upload it to my ELEGOO?
@real_robots Жыл бұрын
If the configurator is communicating at all then you've got the firmware installed correctly. The matrix implementation still has a few bugs, it doesn't like non-square matrices sometimes so try adding 4 more row pins (just assign any unused pin). Could be you've got the rows and columns flipped, give that a go. Also I should say that your UNO won't be able to appear to the computer as a game controller, the microchip lacks that ability. You need to use an Arduino Pro Micro, which has the ATMEGA32U4, which can do HID.
@requiem4adreamc Жыл бұрын
Thanks for the video :) Which type of diode should we use?
@real_robots Жыл бұрын
I used 1n5819 SS14 diodes which are way overkill for this use, but they're what I had lying around. Any diode that can handle 5v (double it for safety to 10v) and you'll be fine as the current passing through is negligible.
@requiem4adreamc Жыл бұрын
@@real_robots Thank you very much :)
@SpookyRipples92 жыл бұрын
Can we see the actual sketch which is going to be uploaded to the board? Does the rr_configrator works with rotary encoders, hall effect sensors, touch sensors etc.?
@real_robots2 жыл бұрын
You can find the firmware sketch below. It does handle rotary encoders, it can do hall effect sensors that provide a PWM output and touch sensors as well if they give a 0-5v on/off signal. (0-3v for ESP32) gitlab.com/realrobots/rr_controller
@Stuffynes Жыл бұрын
Thanks - works perfectly for me!
@Average_Joe692 жыл бұрын
This is awesome, i will be using this software for my project! Can this matrix be used with hat switches aswell?
@quarterpie53383 жыл бұрын
Hey there i wanted to use this type of button matrix for a project where a computer is not available is it possible for the 1st arduino act like a sub device for a second arduino?
@real_robots3 жыл бұрын
Yeah absolutely, either the master or a secondary device can hold the matrix. What exactly do you mean no computer available though? What are you trying to control? Whatever it needs will have to take HID inputs for this software to work with it.
@OgioniBHАй бұрын
Good evening my favorite genius, friends, I'm bothering you again to ask for your help. I made a Matrix with 3 "joysticks" of 5 positions, in rr_Configurator, the buttons are working perfectly, but Windows doesn't recognize all of them, do you have any idea what it could be? It still doesn't include the diodes, could that be why? (Sorry for the English, it's Google Translate)
@real_robotsАй бұрын
@@OgioniBH if it's recognising some but not others, and they're working in the Configurator, I'm guessing you numbered them higher than 32? Windows won't recognise higher than 32
@OgioniBHАй бұрын
@real_robots I put it as directional, in the setup replies... the Windows does not.
@franksonjohnson2 жыл бұрын
Plot twist you've just learned how to build custom keyboards.
@tashvikb10 ай бұрын
Which diode is used in it
@cwtjones2 жыл бұрын
Thanks for the great video. I am totally new to electronics. May i know does this matrix work on ESP32 ? Sorry if this a dumb question, but do i need to add ground wire to this matrix? * I plan to use array in Arduino IDE to scan rows and columns.
@real_robots2 жыл бұрын
Yeah it should work exactly the same on an ESP32, just make sure you pick pins that can do input and output. You don't need to add ground wires, we switch the pinmodes from input to output so the grounds are built in.
@cwtjones2 жыл бұрын
@@real_robots thanks for replying. If i understand correctly, we can set the rows as output, then scan each column's switches within that row. In such case, do i still need the diode?
@real_robots2 жыл бұрын
@@cwtjones from memory that's right, though it might have been the other way around with the rows and columns. If you don't use the diode you'll get something called "ghosting", where keys pressed outside of the ones being sampled will be detected.
@cwtjones2 жыл бұрын
@@real_robots after go thru many articles, i think i understand how it works. If i am correct, we set the row as output, columns as input, then run rows x columns scan. That way we no need to use the ground. But i am confuse as the rows (the diode connection) end with wire connect to pin. I was imagine it should be the begining of the left most switch (first switch of each rows)
@irtehtree Жыл бұрын
What diodes were used here? Is there a rating? Thank you.
@real_robots Жыл бұрын
You could use pretty much any diode here that can handle the voltage. I used ss14 shottky diodes, which are WAY more than what is needed here, because I had them on hand.
@irtehtree Жыл бұрын
@@real_robots Thank you very much.
@ahmetttt10Ай бұрын
25xbuttons + (4x units)Thru-hole 5-way Navigation switch (6pin -Product ID: 504-) how can we connect the buttons in this way. So it has 6 pins (5 way navigation swtich), I guess one of them is gnd? I couldn't find a source anywhere.
@real_robotsАй бұрын
@@ahmetttt10 those guys have 1 common pin. You need to find that and connect it to ground and the rest go to different digital pins. YOu can connect them in a matrix, just consider them to all be in the same column
@ahmetttt10Ай бұрын
@real_robots so the column pin (shown in green) will be connected as Gnd (common pin). I will connect each of the other different legs to the Row pin and add diodes to the ends ? So will I include the potassometer in this matrix? According to the FreeJoy project
@real_robotsАй бұрын
@@ahmetttt10 that's right, and you'd treat each button as being in the same column, and on different rows
@ahmetttt10Ай бұрын
@@real_robots Thank you very much,
@Makethings9872 жыл бұрын
How would one do if they would like an LED to light up when you press a button?
@real_robots2 жыл бұрын
If you use DPST switches you can have one set of poles connected as above, and the other connecting an LED from GND to your voltage.
@Makethings9872 жыл бұрын
@@real_robots I see, only thing is that this button box will be placed behind a real car climate control and my idea is to replace the original PCB with a 3D printed one that the buttons and lights will be placed in the same place, and the climate control LEDs that indicate something on and off are apart, so I need a momentary switch that will trigger a tiny LED that will show that buttons on.
@real_robots2 жыл бұрын
@@Makethings987 So you want the LED to stay active after you press the button? You can do that in code if you've got pins for the LEDs separately to the buttons. It can be done through hardware using D-Type flip-flops. kzbin.info/www/bejne/bZzLioKNbpqbjbM&ab_channel=TexasInstruments
@wudimusic2 жыл бұрын
Hello, the rr_controller softrware seems to not want to accept pin 11,12&13 as output..can i add them without messing anything up?
@real_robots2 жыл бұрын
Are you using an Arduino Pro Micro? It doesn't have pins 11-13 available as GPIOs.
@wudimusic2 жыл бұрын
@@real_robots Nah´i´m using the Leonardo Adding pins 11to13 gave rr_controller a Crash so i colsed them again. I wanted to use A4&5 instead but i can´t select them in the conffigurator either. Other than that, this Tool/Video made my project possible in the first place, so thank you in advance.
@real_robots2 жыл бұрын
@@wudimusic Theres a quick hack that might make it work then, if you go into inputs.ino and find the "inputPins[]" array for the Pro Micro and change the pin numbers to the Leonardo ones it will probably work. They won't change in the GUI so you'll just have to remember the places in the array. I haven't used a Leonardo before, but I can't think of any reason off the top of my head why that wouldn't work.
@wudimusic2 жыл бұрын
@@real_robots Wow, thank you for the great idea/workaround. I need some spare-pins for my Button/Switch-box well i used the GUI to make a 6x7Matrix since there are only 13pins. i managed to get it working ..well.. on a Breadboard, so far at least. Let´s see how i cope once everythin is soldered and my little box is finished. 2 be continued and Thanks again for the Answer.
@mgdchris1768 Жыл бұрын
Hi, Thanks for this very interesting video. I would like to know how to create columns and rows with the RealRobots Gamepad Configurator interphase. I can't, sorry. (I'm on linux and can't use rr_configurator.) THANKS.
@real_robots Жыл бұрын
If you're on linux you can just run it using python, no need to use the windows executable. If you can wait (probably a few more weeks) I've got a much better, web based version now. I've just gotten it stable and its' got the basic features. Am adding extra features like matrices now though. www.realrobots.net/configurator
@mgdchris1768 Жыл бұрын
@@real_robots Thank you for your reply . I will wait impatiently.
@HuntersQuiver2 жыл бұрын
Sorry if this is a really stupid question but how do I upload the RR Configurator SRC to arduino IDE, is that even necessary?
@HuntersQuiver2 жыл бұрын
I have downloaded the SRC ZIP as well as whole directory as ZIP and still IDE says it does not contain a valid directory.
@real_robots2 жыл бұрын
@@HuntersQuiver the configurator is a gui app that you can run in windows, run rr_configurator.exe Before it can talk to any of your arduino devices though you'll have to upload the rr_controller firmware to that device. gitlab.com/realrobots/rr_controller
@rgbcrafts4 ай бұрын
25 buttons? Well, that would be perfect for a 2-Players setup.
@shawnlund Жыл бұрын
I can’t quite wrap my head around why you would need a diode on the row pins but not the column pins?
@real_robots Жыл бұрын
I guess it could be on either of the buttons inputs, it's just to prevent current running back through a pressed button into an unused column and setting off other inputs.
@shawnlund Жыл бұрын
@@real_robots I am coming from a real basic understanding of electronics so bear with me. Couldn’t the ghosting come from both the negative and positive side of the circuit? My question was around why wouldn’t both sides need a diode but I’m starting to see my mistake I think.
@shawnlund Жыл бұрын
You only need a diode on one side because the flow of current is in the positive direction? I really need to read a bit more about this I think. Great video though, your explanation was great, you can help was over my head 😐
@alfonsneumann18783 жыл бұрын
Hi, I just discovered your channel and thought I'd give it a try. I uploaded the firmware to my arduino (v5) and managed to upload a simple configuration to the eeprom. After having success I went to the windows joystick menu, discovered the arduino and opened the menu just like in your video. Unfortunately I did not get any response from the micro. Both leds are lit, I connected two inputs with wire to ground and vcc but did not get any response. Then I tried to configure two pins as rows and two as columns and connected rows and columns with wire but equally failed to get a response (well, I assigned buttons and hat to them). Am I missing something? I appreciate the effort you put into programming the firmware and the python program, looks like a lot of work.
@real_robots3 жыл бұрын
If you're getting a good response in the configurator gui but not from Windows it could be you don't have the address set at zero. There's also a bug where sometimes it doesn't initialize the HID if it wasn't address zero on start and needs to just be unplugged and plugged back in. If you're not getting response in the GUI then forget about the button matrixes for a bit and just wire in one button, have one pin to GND and the other to one of the input pins, make sure it's set to INPUT_PULLUP in the gui and give that a try. Thanks for letting me know the trouble, I really need to do a nice tutorial for the software itself that goes through these kind of issues a bit more clearly. Also it could be you've discovered a new and exciting bug in my software which is always good :-)
@real_robots3 жыл бұрын
Just to add, if you connected your button pins to VCC and GND then when you press it you're just causing a short circuit, try to avoid that. Doing it once or twice probably won't kill the board but it can.
@alfonsneumann18783 жыл бұрын
@@real_robots Only a resolved bug is a good bug (ancient proverb ;-). Thx for the fast answer. I basically did all of the above. I made sure the address is 0 (was by default). I figured that the button matrix is on top of the main program so I deleted every setting there to reduce complexity. Input_pullup is on (by default). That's why I'm lost atm. I think I reduced the complexity to its minimum from my point of view. Having extensive experience in building and debugging electronics I can definitely exclude of having shortened gnd with vcc. If you don't have any other ideas I will give it a try with another micro from another project, just to make sure. But the micro seems completely fine.
@alfonsneumann18783 жыл бұрын
I just tried the very first example of the arduino joystick library ('joysticktest') and it worked fine. It was funny to watch the buttons and two hats being pressed and the axis move by themselves ;-) So it's definitely not the micro.
@real_robots3 жыл бұрын
@@alfonsneumann1878 Very stange, thanks for giving me all the information, looks like I need to do some more testing and see if I can get the same thing happening on my end so I can work out what's going on.
@Kieran_McNally Жыл бұрын
Excellent, thank you 😊
@patrickmulholland18402 ай бұрын
perfect thankyou
@dewizle5026 Жыл бұрын
What type diodes did you use??
@real_robots Жыл бұрын
I used SS14 Schottky diodes. Which is pretty overkill, anything that can handle the voltage will do, I just used what I had on hand.
@maxios-76133 жыл бұрын
what I didn't understand is that if you connected both sides of the button to different input pin, where the ground is gonna be connected to ?
@real_robots3 жыл бұрын
The row pins are the ground, when one is configured to be a ground and the others are not then we can focus on only one switch at a time.
@peastfist16022 жыл бұрын
@@real_robots sorry i dont understand , so you mean 5 row connected to the same ground IO ? Or row actually use IO pin they "act" like a ground ?
@real_robots2 жыл бұрын
@@peastfist1602 The second one, you can switch a pin in code from being basically nothing, to being a ground sink. So only one row is creating a path for those electrons at a time. I don't really go into the code in this video though as my firmware handles it all. A more in depth explanation can be found below (it's not me) www.baldengineer.com/arduino-keyboard-matrix-tutorial.html
@peastfist16022 жыл бұрын
@@real_robots thank you so much ❤️❤️
@benebearded3 жыл бұрын
Hello, I'm making an throttle using two Arduino boards, one on throttle and one on the base to control extra buttons, these buttons I'm trying to use matrix configuration, but I'm having problems, I'll send images to your email, the problem would be what do you comment on ghosting? or did I make another mistake? the strange thing is that in the rr_configurator the buttons respond normally, the problem only happens in windows and I'm also trying to use potentiometers for the throttle but I can't make it go all the way from 0 to 100, and another sliding potentiometer for other commands but this one is causing problems on the plates, according to the resistance it causes the boards turn off...
@benebearded3 жыл бұрын
I just added diodes to the rows connections but nothing has changed
@real_robots3 жыл бұрын
In the video you emailed, are two matrix buttons being detected in windows when you press one? If your matrix is working in rr_configurator but Windows is not getting the USB signal correctly then it's most likely something in my software or Windows, your matrix is working correctly. If your pot is resetting the board when it is fully opened then you're basically short circuiting the 5v to a pin, try putting a 1k resistor on the signal line and see if that helps. You can do some calibration of the pot using the min/mid/max settings in rr_configurator. Running the windows USB calibration is probably easier and works quite well though.
@benebearded3 жыл бұрын
@@real_robots that's right, press one and two respond, only 2 buttons of the entire matrix are normal, I've already tested two configurations of columns and rows and the problem remains, yes I changed the values of min/mid/max but it doesn't range from 0 to 100 only from 0 to 30 for example, I'm going to test the windows calibration. About the potentiometer, it only happens with the slider I don't know if I may have connected to the wrong pins, if that would cause this effect.
@real_robots3 жыл бұрын
@@benebearded I'll have to have a play around and see if I can reproduce the problem. It's almost certainly some bug in my code. I haven't played with sliding pots much, but it makes perfect sense if it is dropping to zero ohms of resistance it's fail, a low value resistor on the output pin should fix that so there's always at least some resistance. For the calibration, I'm not sure if this helps but I know I haven't really documented it well. The min/max signal the pro micro pins can take will be from 0-1023, your min should be the minimum your stick goes to and max should be the max it goes to. The calibrated value should be -32767 to 32767. It's usually best to just leave min/max alone and let the windows auto-calibrator do it.
@benebearded3 жыл бұрын
@@real_robots Unfortunately the pot didn't work, that's what happens, the value goes down and everything turns off, even using a resistor in it. about the throttle adjustment it worked, I redid the calibration by the configurator and everything is ok now. the matrix I undid and in the normal way, a button for each output of the arduino, many more cables but it works.
@OgioniBH2 жыл бұрын
Good morning.. I did like the video, but without the diode (for now), the rr_controller worked, but in the windows settings it didn't.
@real_robots2 жыл бұрын
Theres a couple of common things that might cause that, what board are you using? Is it an Arduino Pro Micro? The only Arduinos that can talk directly to windows are those with an Atmega32U4 main chip like the Pro Micro or the Leonardo. The other thing is that the windows usb tool won't update unless it's selected, so make sure to click on it to make sure it's got focus before testing.
@OgioniBH2 жыл бұрын
@@real_robots Thank you very much for your attention, sorry English is the translator. I explained myself badly, it identifies.. some buttons work. I used Matrix.. it only recognizes two buttons.. and not all. In time.. I'm using pro micro
@real_robots2 жыл бұрын
@@OgioniBH I'm not sure why only some work if you followed the schematic. Leaving out the diodes shouldn't effect the buttons working, the worst that will happen is buttons firing when they shouldn't.
@OgioniBH2 жыл бұрын
@@real_robots Thank you so much for your attention friend, I'll study better to see if I didn't do anything wrong.
@OgioniBH2 жыл бұрын
@@real_robots Friend, another thing, the matrix only works, 2x2, 3x3, 4x4?? or works 2x5
@Jo-rz6bs3 жыл бұрын
Hi there, I'm looking at building a joystick, using the software your making, and I was wondering, can a single device run both a button matrix and other sensors (I've got some pots), or do I need to serialise for that?
@real_robots3 жыл бұрын
Yep you can do a matrix and whatever individual digital and analog inputs you like on one device, so long as you've got enough pins.
@Jo-rz6bs3 жыл бұрын
@@real_robots ideal, since I plan on a few hat switches, and you can only really fit two. Going to take some planning of wiring though, to get it sorted
@real_robots3 жыл бұрын
@@Jo-rz6bs If you end up doing hat switches on a matrix I'd love to see how it works out, I've thought about it but haven't tried yet. I usually just throw another microcontroller at it when I need more pins.
@Jo-rz6bs3 жыл бұрын
@@real_robots I do have a couple controllers, current thoughts are to do 4 Hats of four, as though it's a matrix of 16, with any 5 ways as an additional single input. Double the hats on the same pins I think? Do you have a subreddit or discord or something I could use v to share v any plans?
@real_robots3 жыл бұрын
@@Jo-rz6bs I think you could do that with the 4 common pins as your columns and each of the direction pins in a row, so 8 pins total, add one extra if you're using 5 way hats. If you want to show it to me you can email at realrobotshk@gmail.com I don't have subreddit or discord, I find reddit.com/r/hotasdiy is pretty good though so I'll usually post there when I have something to show off or a question to ask.
@felipefigueroa9449 Жыл бұрын
Outstanding
@JD968933 жыл бұрын
i've been following your videos and plan on using your software for a throttle as its probably the best out there. However i think there is a better solution with IO expanders, they are cheaper and smaller than an Arduino pro micro or a button matrix. Have you thought about using one in conjunction with your software? I'd do it myself as i've been experimenting with one, but i lack the programming knowledge. For the time being at least. These could be used really well with the different parts of your controllers.
@real_robots3 жыл бұрын
I plan on adding compatibility with MCP23017 which is pretty common, cheap and easy to use. The reason I went with networking the microcontrollers is because they have analog inputs and most gpio exapanders don't. I also get all my Pro Micros from china where they are super cheap, not as cheap as an MCP23017, but still pretty cheap.
@JD968933 жыл бұрын
@@real_robots I did not think about analog inputs, good point! How much do you pay for a pro micro? They are not so cheap where i live. I have been experimenting with the pcf8574. It is fairly cheap(less than the MCP23017) and easy to use and also doubles as a LED driver. Only draw back i can see is there are only 8 pins, although there is a 16 pin version. Cant wait to see what you come up with! You are making some great stuff for the PC sim community, hopefully i can eventually contribute in some small way with pcf8574 compatibility.
@thebaconbreadful3 жыл бұрын
Hey! very nice video. How about you add some debounce circuit to it in the future? :)
@real_robots3 жыл бұрын
The time taken to sample every button in the matrix pretty much removes the need for any debouncing. You could certainly do it if you needed super high resolution button sampling, but as it is if I was having problems I'd just increase the delay between samples to slightly longer and you'd still never notice it.
@thebaconbreadful3 жыл бұрын
@@real_robots Yea it really depends on the application. I am currently building a musical application where time is critical. If I wouldn`t debounce it would trigger multiple samples. Since I want fast responsetimes I take the first occurance of a high singnal instead of waiting for the signal to be stable. The debounce is reaslised with a "shutdowntime", so the application waits till the signal is stable until you can press the button again. In your example the first sample you take does not have any debouncing and the last sample does have the greatest. Nontheless if it works it just works :D
@real_robots3 жыл бұрын
@@thebaconbreadful ah, yeah if you're using an interrupt to detect signals going over a threshold you need good debouncing. I just sample no faster than 200 times a second, its way faster than you'd ever need to capture a human keypress (usually around 100ms at the shortest) and since bouncing usually occurs within a pretty small window of
@thebaconbreadful3 жыл бұрын
@@real_robots oh I wasn't aware of the sampling speed. Indeed I wouldn’t care about debouncing in this case either. I am using a 240 mHZ Microcontroller Processor so it’s a different story for me :D
@NoOne.--_.--..._--_..l--l Жыл бұрын
Is 6×10 matrix possible with arduino
@real_robots Жыл бұрын
Sure, there's a bug in this particular firmware which makes it fail sometimes with mismatched colums/rows, so you'd be better off connecting them as an 8x8 if you're going to use it.
@vtstechnologies57373 жыл бұрын
can you make the ide to create the arduino ide file as well so we can customize it? it would be nice to then see the code so we can add screens and special display logics.
@real_robots3 жыл бұрын
The code is 100% open source, you can download the configurator from my git repo and run the compiled .exe or play with the python files yourself. www.gitlab.com/realrobots/rr_configurator Same thing for the firmware that goes on the controller, you can find that at www.gitlab.com/realrobots/rr_controller
@snozking2 жыл бұрын
thankyou
@daemon3spade2 жыл бұрын
how would you do a 70 button matrix tho?
@real_robots2 жыл бұрын
The same way, just keep going to 8x9 or 9x8 rows/columns. The only problem is you will run out of usable inputs on the Arduino Pro Micro so you'll have to use a device with more inputs, or else use a GPIO expander like the MCP23017
@vtstechnologies57373 жыл бұрын
what kind of diodes are you using? . i think it does not work without it for the matrix.
@real_robots3 жыл бұрын
You'll get ghosting (seemingly random keypresses caused by current running the wron gway) if you don't use the diodes. Almost any diode will work as the energy flowing through is so low. I used 1N4007 diodes which are way more than what you'd need, but they're what I had on hand.
@vtstechnologies57373 жыл бұрын
@@real_robots well in my case i am hacking joystick boards with it to test. so i use the onboard traces. i now rebuilt the logitech 3d pro entirely and converted the hat switch into buttons. as for the Oled code where should i place it?
@AminNm2 жыл бұрын
you are legend
@rogerlee34359 ай бұрын
Yes, a great video. I haven't finished my matrix yet - waiting for the diodes to arrive. And also thank for the software. I will be using an 8x8 matrix for the buttons. Can you confirm that I am not going to run into a problem with the number of buttons; something tells me that there is sometimes a problem of that kind. I'm using Windows 10 and XPlane 12.
@real_robots9 ай бұрын
Your problem won't be with the matrix, but with the fact that windows HID won't read past 32 buttons for a gamepad. You can bypass this by setting it up as a keyboard and assigning it keyboard keys.
@rogerlee34359 ай бұрын
Thanks for that quick reply. Just to be clear when you say 'set it up as a keyboard', do you mean set the matrix up as a KB? Then I go off and find what? QMK? Or is there something a bit more user friendly? Command line stuff scares the ! out of me. Really appreciate your help. If you can just point me somewhere...then I'll leave you in piece@@real_robots
@Karedu.3 жыл бұрын
i have a doubt i have buttons that only have 2 pins, how would i do this matrix of buttons?, i got 32 buttons that i need in my circuit if someone knows how please coment down bellow 🌟✨🌟✨
@real_robots3 жыл бұрын
You can do 32 buttons no problem, just add and extra column and row to my schematic above. 6x6 will give you up to 36 buttons using 12 pins. Just don't connect the last 4 in the last row. If your buttons have only 2 pins that's fine, mine effectively have only 2 pins as well, the top ones are directly connected to their opposites on the bottom (from the view of my schematic at 1:53). Instead of having the green wire wire coming into the top of the button and going out of the bottom, you can have them both connected to the same pin, no prob.
@Karedu.3 жыл бұрын
@@real_robots thanks man 😎👍
@RevvedUpPhotography5 ай бұрын
Hi nice Video
@paulb36utube3 жыл бұрын
This is amazing. I love this project. The fact that you can join multiples up is a solid for me as I want what you have managed to do and have multiple boards ....with only the one input USB used. All I need now is something like (the twin joysticks) kzbin.info/www/bejne/bZaYh5x7g8tjjpY (Ive been waiting for him for ever, maybe some inspiration!!) Ive managed to get the 2 joysticks working but the values seem to be all over the place.
@real_robots3 жыл бұрын
Thanks, that's the second guy I've seen do that weird 2 x little joystick in that arrangement, I wonder if it takes much to get used to that. I might have to do one just to try it out, I've only got ONE joystick unit like those ones, I need a second. I'm working on a bluetooth gamepad that's HOTASish at the moment and was thinking of using those same joysticks but they were a bit big for that so I ended up using the PS2 controller style, clicky ones.
@paulb36utube3 жыл бұрын
@@real_robots They do look a lot of fun. big plus for me is the use of a mouse. 1 less piece of hardware on the table (so I can fit in more button boxes!)
@donpera3654 Жыл бұрын
😇😇😇😇😇😇😇😇
@JoePCP Жыл бұрын
In order for this to work correctly you need a diode on each button, or pressing more than one button will give conflicting results.
@Kieran_McNally Жыл бұрын
Which is exactly what he has done, thereby allowing multiple keypresses.
@williamrobinson7221 Жыл бұрын
how do you power the matrix
@real_robots Жыл бұрын
The column pins provide the power, the row pins read the signal, and also have pull-up resistors built in.
@frankda43 жыл бұрын
If you press the top 2 buttons in the left most column and the top button in 2nd left most all at the same time; then would you not be able to tell if the [2,2] button had also been pressed as well?