Instructions - Button Matrix

Поделиться
HTML-код
  • Опубликовано: 27 июн 2024
  • In this video I'll show you how to make a button matrix and get the maximum amount of buttons on your microcontroller, whether you're using the rr_configurator software or not.
    Support realrobots at / realrobots
    Get the software and firmware at
    gitlab.com/realrobots/rr_conf...
    Discord: / discord
    Download the STL files for free or buy full DIY kits.
    www.realrobots.net
    0:00 How button matrixes work
    1:52 Complete schematic
    2:03 Wiring it up
    7:55 Setting up with rr_configurator
    10:41 Configuring as a sub device

Комментарии • 190

  • @SticksAandstonesBozo
    @SticksAandstonesBozo 5 месяцев назад +11

    My god there is so much useless info on here about this. Finally a video that simply explains the matrix on arduino and WHY

  • @coltius
    @coltius 2 года назад +28

    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.

  • @Jerichoom
    @Jerichoom 2 года назад +5

    this video tut deserves significantly MORE likes than it has right now! Excellent description, thank you very much.

  • @pastorhudson
    @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
      @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.

    • @Dutch3DMaster
      @Dutch3DMaster 2 месяца назад

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

  • @Snugggg
    @Snugggg 2 года назад +4

    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.

  • @terrylyn
    @terrylyn Год назад

    Your channel is amazing, so much useful information for this kind of projects.

  • @fedorkarpov7444
    @fedorkarpov7444 Год назад

    This is exactly what I was looking for, thank you

  • @wayneshephard
    @wayneshephard 5 месяцев назад +1

    Still come back to these years later :)

  • @dunklerKurfurstDesDeepstat
    @dunklerKurfurstDesDeepstat Год назад

    thanks mata, thats exactly what i needed

  • @Kieran_McNally
    @Kieran_McNally Год назад

    Excellent, thank you 😊

  • @felipefigueroa9449
    @felipefigueroa9449 10 месяцев назад +1

    Outstanding

  • @wardker
    @wardker 2 года назад +3

    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_robots
      @real_robots  2 года назад +5

      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.

    • @wardker
      @wardker 2 года назад +1

      @@real_robots Thanks a lot. Again, a very instructive video. Subbed!!!

  • @AminNm
    @AminNm 2 года назад

    you are legend

  • @Average_Joe69
    @Average_Joe69 2 года назад

    This is awesome, i will be using this software for my project!
    Can this matrix be used with hat switches aswell?

  • @Mauro-qy6sr
    @Mauro-qy6sr Год назад

    Is layered programming possible to use the keyboard for games, writing and macros for example?

  • @ryanwees5918
    @ryanwees5918 Год назад

    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?

  • @Jackg1822
    @Jackg1822 6 месяцев назад +1

    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.

  • @Felix-di2tc
    @Felix-di2tc 19 дней назад

    Hi nice Video

  • @frankda4
    @frankda4 2 года назад

    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?

  • @shibiwowsawesomegaming4783
    @shibiwowsawesomegaming4783 6 месяцев назад

    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.

  • @snozking
    @snozking Год назад

    thankyou

  • @donpera3654
    @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

  • @eatthisvr6
    @eatthisvr6 2 месяца назад

    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?

  • @rakeshgupta-nh2hu
    @rakeshgupta-nh2hu 2 года назад

    We need this type of work engineer which make matrix keypads

  • @requiem4adreamc
    @requiem4adreamc Год назад

    Thanks for the video :) Which type of diode should we use?

    • @real_robots
      @real_robots  Год назад +1

      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
      @requiem4adreamc Год назад

      @@real_robots Thank you very much :)

  • @quarterpie5338
    @quarterpie5338 2 года назад

    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_robots
      @real_robots  2 года назад

      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.

  • @user-yv4pr8cb5u
    @user-yv4pr8cb5u 6 месяцев назад

    how to save pins but get a bigger matrix is to for collum use 3 pins and code a binary counter using 3 pins on the arduino and make the 3 pins go to a 3 to 8 decoder

  • @rogerlee3435
    @rogerlee3435 3 месяца назад

    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_robots
      @real_robots  3 месяца назад

      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.

    • @rogerlee3435
      @rogerlee3435 3 месяца назад

      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

  • @atifahmed6036
    @atifahmed6036 4 месяца назад

    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

  • @mrai5633
    @mrai5633 Год назад

    Hello, how to wire 5 rows by 15 column and assign number to each ex. 1 to 75 thanks you

  • @markrogers7304
    @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...

  • @ciri151
    @ciri151 2 года назад +1

    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_robots
      @real_robots  2 года назад +1

      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

    • @ciri151
      @ciri151 2 года назад +1

      @@real_robots thank you!

  • @SpookyRipples9
    @SpookyRipples9 2 года назад

    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_robots
      @real_robots  2 года назад

      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
      @Stuffynes Год назад

      Thanks - works perfectly for me!

  • @Snugggg
    @Snugggg 11 месяцев назад

    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
      @real_robots  11 месяцев назад +1

      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.

  • @rogerlee3435
    @rogerlee3435 3 месяца назад

    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.

  • @JD96893
    @JD96893 2 года назад

    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_robots
      @real_robots  2 года назад +1

      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.

    • @JD96893
      @JD96893 2 года назад

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

  • @raycrivello2233
    @raycrivello2233 Год назад

    Hopefully this is still active. Is there any reason the "Button matrix" won't see my pins?

  • @thebaconbreadful
    @thebaconbreadful 2 года назад

    Hey! very nice video. How about you add some debounce circuit to it in the future? :)

    • @real_robots
      @real_robots  2 года назад

      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.

    • @thebaconbreadful
      @thebaconbreadful 2 года назад

      @@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_robots
      @real_robots  2 года назад +1

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

    • @thebaconbreadful
      @thebaconbreadful 2 года назад

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

  • @HuntersQuiver
    @HuntersQuiver 2 года назад

    Sorry if this is a really stupid question but how do I upload the RR Configurator SRC to arduino IDE, is that even necessary?

    • @HuntersQuiver
      @HuntersQuiver 2 года назад

      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_robots
      @real_robots  2 года назад

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

  • @cwtjones
    @cwtjones 2 года назад

    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_robots
      @real_robots  2 года назад +1

      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.

    • @cwtjones
      @cwtjones 2 года назад

      @@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_robots
      @real_robots  2 года назад

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

    • @cwtjones
      @cwtjones 2 года назад

      @@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)

  • @tashvikb
    @tashvikb 4 месяца назад

    Which diode is used in it

  • @Delorean29
    @Delorean29 Год назад

    Can I use these to wave sound filés effects on micro SD card player??

    • @real_robots
      @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

  • @vtstechnologies5737
    @vtstechnologies5737 2 года назад

    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_robots
      @real_robots  2 года назад

      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

  • @powerchill
    @powerchill Год назад

    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_robots
      @real_robots  Год назад +2

      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.

    • @powerchill
      @powerchill Год назад

      @@real_robots alright, thanks for the quick reply man. really appreciate it!

    • @powerchill
      @powerchill Год назад

      @@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_robots
      @real_robots  Год назад +2

      @@powerchill sounds like I just need to write better code. Thanks for letting me know that fix worked

  • @ED209no
    @ED209no 14 дней назад

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

  • @Jo-rz6bs
    @Jo-rz6bs 3 года назад

    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_robots
      @real_robots  3 года назад

      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-rz6bs
      @Jo-rz6bs 3 года назад

      @@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_robots
      @real_robots  3 года назад

      @@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-rz6bs
      @Jo-rz6bs 3 года назад

      @@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_robots
      @real_robots  3 года назад

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

  • @slybunda
    @slybunda 2 года назад +1

    can it detect all buttons being simultaneously pressed?

    • @real_robots
      @real_robots  2 года назад

      Absolutely, if you use this circuit your will get accurate results no matter how many of the buttons you press at once.

  • @vtstechnologies5737
    @vtstechnologies5737 2 года назад

    what kind of diodes are you using? . i think it does not work without it for the matrix.

    • @real_robots
      @real_robots  2 года назад

      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.

    • @vtstechnologies5737
      @vtstechnologies5737 2 года назад

      @@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?

  • @samadtube
    @samadtube Год назад

    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_robots
      @real_robots  Год назад

      There's a bug with the configurator, it doesn't like odd matrices. Try adding a 6th on an unused pin

    • @real_robots
      @real_robots  Год назад

      Don't need an actual row, just assign it in the configurator

  • @dawudmc
    @dawudmc 2 года назад

    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_robots
      @real_robots  2 года назад

      Are you using an Arduino Pro Micro? It doesn't have pins 11-13 available as GPIOs.

    • @dawudmc
      @dawudmc 2 года назад

      @@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_robots
      @real_robots  2 года назад

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

    • @dawudmc
      @dawudmc 2 года назад

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

  • @Delorean29
    @Delorean29 Год назад

    I need Atiny85 8 pin & DF player & 20 button for 3 cables input. Atiny85 is enough?

    • @real_robots
      @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.

  • @dewizle5026
    @dewizle5026 7 месяцев назад

    What type diodes did you use??

    • @real_robots
      @real_robots  7 месяцев назад

      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.

  • @skwinged
    @skwinged 18 дней назад

    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_robots
      @real_robots  17 дней назад

      Maybe? Let me know if it works.

    • @skwinged
      @skwinged 14 дней назад

      @@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_robots
      @real_robots  14 дней назад

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

  • @joshuabduck4986
    @joshuabduck4986 9 месяцев назад

    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
      @real_robots  9 месяцев назад +1

      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.

  • @astonishing-a
    @astonishing-a 25 дней назад

    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_robots
      @real_robots  25 дней назад

      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-a
      @astonishing-a 25 дней назад +2

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

  • @mgdchris1768
    @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
      @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
      @mgdchris1768 Год назад

      @@real_robots Thank you for your reply . I will wait impatiently.

  • @benebearded
    @benebearded 3 года назад

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

    • @benebearded
      @benebearded 3 года назад

      I just added diodes to the rows connections but nothing has changed

    • @real_robots
      @real_robots  3 года назад

      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.

    • @benebearded
      @benebearded 3 года назад

      ​@@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_robots
      @real_robots  3 года назад +1

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

    • @benebearded
      @benebearded 3 года назад

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

  • @irtehtree
    @irtehtree 11 месяцев назад

    What diodes were used here? Is there a rating? Thank you.

    • @real_robots
      @real_robots  11 месяцев назад +1

      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
      @irtehtree 11 месяцев назад

      @@real_robots Thank you very much.

  • @be.ants1239
    @be.ants1239 6 месяцев назад

    i constandly get an error saying thatthere is no such file or directory

  • @Makethings987
    @Makethings987 2 года назад

    How would one do if they would like an LED to light up when you press a button?

    • @real_robots
      @real_robots  2 года назад +1

      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.

    • @Makethings987
      @Makethings987 2 года назад

      @@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_robots
      @real_robots  2 года назад

      @@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.
      ruclips.net/video/7khYOW95hWQ/видео.html&ab_channel=TexasInstruments

  • @alfonsneumann1878
    @alfonsneumann1878 3 года назад +1

    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_robots
      @real_robots  3 года назад +1

      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_robots
      @real_robots  3 года назад +1

      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.

    • @alfonsneumann1878
      @alfonsneumann1878 3 года назад +1

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

    • @alfonsneumann1878
      @alfonsneumann1878 3 года назад +1

      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_robots
      @real_robots  3 года назад +1

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

  • @daemon3spade
    @daemon3spade 2 года назад

    how would you do a 70 button matrix tho?

    • @real_robots
      @real_robots  2 года назад

      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

  • @maxios-7613
    @maxios-7613 2 года назад

    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_robots
      @real_robots  2 года назад +1

      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.

    • @peastfist1602
      @peastfist1602 Год назад

      @@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_robots
      @real_robots  Год назад

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

    • @peastfist1602
      @peastfist1602 Год назад

      @@real_robots thank you so much ❤️❤️

  • @franksonjohnson
    @franksonjohnson Год назад

    Plot twist you've just learned how to build custom keyboards.

  • @shawnlund
    @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
      @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
      @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
      @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 😐

  • @OgioniBH
    @OgioniBH 2 года назад

    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_robots
      @real_robots  2 года назад +1

      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.

    • @OgioniBH
      @OgioniBH 2 года назад

      @@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_robots
      @real_robots  2 года назад +1

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

    • @OgioniBH
      @OgioniBH 2 года назад +1

      @@real_robots Thank you so much for your attention friend, I'll study better to see if I didn't do anything wrong.

    • @OgioniBH
      @OgioniBH 2 года назад

      @@real_robots Friend, another thing, the matrix only works, 2x2, 3x3, 4x4?? or works 2x5

  • @NoOne.--_.--..._--_..l--l
    @NoOne.--_.--..._--_..l--l 11 месяцев назад

    Is 6×10 matrix possible with arduino

    • @real_robots
      @real_robots  11 месяцев назад

      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.

  • @paulb36utube
    @paulb36utube 3 года назад +3

    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) ruclips.net/video/7e5ViENf0X4/видео.html (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_robots
      @real_robots  3 года назад +2

      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.

    • @paulb36utube
      @paulb36utube 3 года назад +2

      @@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!)

  • @Karedu.
    @Karedu. 2 года назад

    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_robots
      @real_robots  2 года назад

      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.
      @Karedu. 2 года назад

      @@real_robots thanks man 😎👍

  • @donpera3654
    @donpera3654 Год назад

    😇😇😇😇😇😇😇😇

  • @JoePCP
    @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
      @Kieran_McNally Год назад +2

      Which is exactly what he has done, thereby allowing multiple keypresses.

  • @williamrobinson7221
    @williamrobinson7221 Год назад

    how do you power the matrix

    • @real_robots
      @real_robots  Год назад

      The column pins provide the power, the row pins read the signal, and also have pull-up resistors built in.

  • @felipefigueroa9449
    @felipefigueroa9449 10 месяцев назад

    Outstanding

  • @frankda4
    @frankda4 2 года назад

    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_robots
      @real_robots  2 года назад

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