No video

How to Build a Button Box

  Рет қаралды 242,370

Wim

Wim

Күн бұрын

Пікірлер: 877
@wimwamjoey
@wimwamjoey 4 жыл бұрын
BTW this video is designed for newcomers with no experience in coding or electronics. There is a bunch of extra functionality you could get out of an arduino based button box (multi position switches, hat switches, mini joysticks etc) but I decided to leave that out and stick to components which are simpler to code and use
@ivanravenski
@ivanravenski 4 жыл бұрын
I'm not using rotary encoders what should i change.
@wimwamjoey
@wimwamjoey 4 жыл бұрын
​@@ivanravenski Just set the number for rotary encoders to zero at the top and remove the lines of code which refer to rotary encoders. (the bit around 24.34 in the video). However, if you are JUST using buttons (no rotary encoders or potentiometers) it will be much cheaper and easier for you to use a zero delay USB controller as described in this video: kzfaq.info/get/bejne/gd5jYK2ZuZq8j4E.html
@user-mx1nf5rf5y
@user-mx1nf5rf5y 3 жыл бұрын
Can I use "pro mini"?
@TheLukemcdaniel
@TheLukemcdaniel 3 жыл бұрын
yeah, but multipos and hat switches are little more than several buttons in one compact spot. I'm considering doing this for elite dangerous, where there's several functions that you'd never do at the same time where multipos can save space on the layout of the box in exchange for a bit more wiring on the inside.
@erentabar6628
@erentabar6628 3 жыл бұрын
I dont use potansiometers. Where should I change
@dany_2945
@dany_2945 3 жыл бұрын
i am so jealous that you got a store like that
@janzugic6798
@janzugic6798 3 жыл бұрын
i got something even better, aliexpress
@slipknotfan2217
@slipknotfan2217 3 жыл бұрын
@@janzugic6798 true, the prices in that store are crazy high
@greensmoke420ftw
@greensmoke420ftw 2 жыл бұрын
Go to a commercial truck repair supply store
@jcdock
@jcdock 2 жыл бұрын
@Joshua Lawson the store he is in is a Jaycar
@gorillaau
@gorillaau 2 жыл бұрын
Yes, it's a Jaycar store. Prices are high, but when you need something in a hurry, they are open seven days a week, when no one else is. As a hobbyist, I use them when needing something in a hurry or short of a component for that weekend project.
@cfidad7005
@cfidad7005 3 жыл бұрын
Followed your instructions exactly, I've built multiple button boxes for my flight simulator to include avionics, radios, engine controls, etc. I've probably saved at least over $1000 not buying the Logitech or Saitek equivalents of what I made for under $200. $100 for 5 Arduino Leo's + $100-ish for wood, paint, switches, etc.Thanks for keeping it simple.
@tommyfallon7925
@tommyfallon7925 3 жыл бұрын
What rating potentiometers did you use? For the leonardo
@cfidad7005
@cfidad7005 3 жыл бұрын
@@tommyfallon7925 I used 50k Ohm linear potentiometers on one of the button boxes I built. Plenty of resolution for the function of cowl flap controls.
@justinthomas85
@justinthomas85 3 жыл бұрын
You deserve a medal, a beer or some type of recognition for this video. This is absolutely incredible. Thank you.
@mattduncan3304
@mattduncan3304 3 жыл бұрын
Much respect for providing concepts and advice rather than just a step by step of doing one thing one way. Most useful video I've seen on this subject.
@mikekal4472
@mikekal4472 Жыл бұрын
Thank you so much for this great video! With your instructions I just build a 6x6 Button Matrix with 4 rotary encoders (without a button). Thus completely filling my leonardo's pins. 2 notes on your video so as to help others. 1) You can go over 32 buttons, directx supports 128 (my new button box has 44) BUT the game itself has to support 128 buttons per controller. Not all games do. If you want to test a button box with more than 32 buttons don't use the windows default game controller, because it only supports 32 buttons. There are great third party tools like Planet pointy's Joysticktest. 2) And most important NOT ALL rotary encoder have ground on the middle pin. My encoders where not marked and I assumed that the middle pin is ground, but it was actually the right pin that was ground. If your encoder gives erratic pulses mostly on one direction, you probably have the wrong pin for ground. Do the test on one encoder beforehand to save you a lot of pain. It took me all afternoon to figure that one out. Again thank you for a great video!
@funwithfitswell6609
@funwithfitswell6609 Жыл бұрын
Finally a code that covers it all! I have been trying to blend matrix and joystick for a while. I just could not get it to work. I have no rotaries, I just commented those out and it works great!!! Thank you for the time you took to put this together !!!! You Rock!
@wimwamjoey
@wimwamjoey Жыл бұрын
If you want a hot tip, chat GPT can actually do most of this coding all by itself. All you need to do is tell it to write code for an arduino button box using the keypad and joystick libraries and tell it how many buttons and other components you want. That thing is scary good.
@funwithfitswell6609
@funwithfitswell6609 Жыл бұрын
@@wimwamjoey Wow.....never imagined! You just added to the list of all the scary cool things it can do. Thanks again for your time!
@DavidGarciaDaluz
@DavidGarciaDaluz 2 жыл бұрын
A HUGE thank you from the bottom of my heart!!! You've just opened a whole new universe of possibilities in a half an hour video. This is a gem for electronics newbies like me. Thank you so much.
@WilliamBrothers
@WilliamBrothers 9 ай бұрын
For a few years I've wanted to make the P-47D-40's arming panel. This video gives me a lot more confidence starting it as a project
@aaaidan
@aaaidan 3 жыл бұрын
Just FYI, push buttons can share a ground for one of their terminals. The other terminal needs a dedicated pin in “INPUT_PULLUP” mode. This almost halves the number of pins needed per button, so you may not need to do that matrix trick.
@panicpetes7676
@panicpetes7676 3 жыл бұрын
Actually, you're better off with the matrix method whenever you have more than 5 buttons. For 6 buttons a 2x3 matrix is enough and uses only 5 pins instead of 6. The more buttons you have, the bigger the advantage. For 25 buttons you can use a 5x5 matrix, so only 10 pins instead of 25. And the Keypad library also has built-in debouncing. I'm not sure if this is relevant when you send the buttons straight to the Joystick library, but if you want to use the button inside your code to switch modes you should have some form of debouncing. If you want to reduce the number of pins required even further, you may want to look into shift registers. They are quite cheap, only need four pins (or three for some models), and you can daisy-chain them getting 8 inputs per register (still needing only three or four pins per chain). I'm currently redesigning my button box with shift registers because I need to free up some pins so it can also handle my pedals and gear shifter that are currently handled by the steering wheel I am going to replace at some point.
@aaaidan
@aaaidan 2 жыл бұрын
@@panicpetes7676 This makes total sense if you're optimizing for number of pins. But if you've got the pins spare, a "one pin per button" approach seems much simpler to me, and in many cases that would be "better" overall. Wouldn't you agree?
@panicpetes7676
@panicpetes7676 2 жыл бұрын
@@aaaidan ​ I do agree that the wiring is much simpler if you connect the buttons directly, but as you said it would reduce the number of pins used in your original comment, I thought I'd clarify that this depends on the number of buttons you want to use. Also, in my experience, these projects tend to grow over time, so I'd recommend to use as few pins as possible in the beginning. I started with a rather simple button box (7 push buttons, 3 momentary on-off-on toggle switches, 3 rotary encoders and one pot). Later I added a DIY handbrake using a load cell and HX711 amplifier, so I needed two more digital pins. And as already hinted in my previous comment, I am now using the same Arduino to also handle my Logitech G25 pedals (+3 analog pins) and gear shifter (+2 analog and +3 digital pins).
@aaaidan
@aaaidan 2 жыл бұрын
@@panicpetes7676 You're right - choosing the right approach depends on several factors. In the pinned comment it says "this video is designed for newcomers with no experience in coding or electronics", and I hope to convince you here that this is _the_ most important factor. My hunch is that for many folk (especially those beginning electronics) using the minimum possible number of pins is just not very important, especially when their board probably has plenty to spare. The matrix approach is a powerful (and delightful) concept to introduce to beginners. But it also acts as additional barrier to entry - an unnecessary one - because a first project is unlikely to run out of pins. Using a matrix takes more effort to learn, and extra time (and testing) to build correctly. There are also more points of potential failure. It could easily be the difference between an enthusiastic young person finishing their first project or not. Or even starting out in the first place. As experts, it's incredibly hard for us to keep perspective on how far we've come in our journeys, and almost impossible to "simulate" how much more effort everything is as a beginner. For these reasons, I strongly recommend folk start out with "pullup+ground" pins until there are no more pins available, before investing in mitigations (like a matrix) that add complexity. This basic approach still allows a dizzying variety of exciting and useful _first projects_ to build. If a project outgrows the pin count, simply switching to the matrix wiring at that point would be a fun and satisfying optimization/workaround. People often are most motivated, and learn best, when they're solving a clear and present problem. Depending on factors, I'd even suggest considering just solving the pin problem by buying another board with more pins, or even using a separate I/O chip (like a multiplexer or I2C expander). Perhaps this seems wasteful or unsophisticated to some experts. but I hope we can agree that it's more important to draw beginners in to the fascinating and joyful world of electronics, than to insist on best practices from the very start. What do you think?
@panicpetes7676
@panicpetes7676 2 жыл бұрын
@@aaaidan I fully agree with everything you wrote - when starting a project from scratch. In this case however, with a full code provided I think it is far easier for beginners to adapt the existing code to their project (as it is described quite well in the video) than to rewrite the whole button section.
@MicroplaysMC
@MicroplaysMC Жыл бұрын
I know a little about arduinos and electronics, but I've already learned the foundation for expectations watching this. It's extremely well-thought out, lots of hints and pointers for those who are just getting introduced. I've been wanting to make my own macropad for a while but most videos I come across are specific and hardly explain the working principles. I appreciate this!
@GeoFry3
@GeoFry3 3 жыл бұрын
Played with these in school, didn't really understand their potential until I started working in commercial/industrial HVAC/building controls. Amazing little beasties that are just as capable as their industrial cousins for 1/10-1/20 the price and open source. No very expensive licensing. Great video. Thank you for the inspirational kick for my projects. I have several "space ship" cockpit builds that I am working on. The first a playset for my young children, and the second a fighter cockpit for my space sims.
@marcuswayne6131
@marcuswayne6131 3 жыл бұрын
Open source is the way of the future.
@ArdiOye
@ArdiOye 2 жыл бұрын
Wow, I made my first button box and followed your coding instructions and it works flawlessly! Thanks for uploading!
@ratrodshaggy4840
@ratrodshaggy4840 3 жыл бұрын
Thank you! I love amstudio but his description of the button matrix sent my brain into a tailspin. Your visual explanation helped so much. Awesome.
@Babyboomer_59
@Babyboomer_59 Жыл бұрын
I've got my wheels turning in my head, I have to give a huge appreciation to you Wim and all like you that take the time to put these helpful videos together for us, so thanks! What I meant by wheels turning, I'd like to add a key Switch on/off interrupt to disable the box when not in use or away from the sim and I see away to do that on all of the buttons that require a ground which is easy "just place a turn key switch inline before connecting gnd to the board to act as an interrupt". so when I enter the sim I turn the key to the on position thus enabling those buttons, now that being said I don't see a possible or easy way to add a second keyed interrupt to the buttons that don't require a ground. I'd just like to add more realism to the process.
@wimwamjoey
@wimwamjoey Жыл бұрын
You could get a USB switch? That way you just switch the whole arduino off.
@Babyboomer_59
@Babyboomer_59 Жыл бұрын
@@wimwamjoey I'm looking at them now thanks, I had no idea they were an option. Another thought just came to me while sitting here, add a starter button and just interrupt that single starter button with a key switch, I think that might achieve what I'm looking for, that or just omit the starter button and use the key switch for the starter, food for thought but I think I'd like the duel method for starter.
@chris8video
@chris8video 3 жыл бұрын
I just finished buidling my box and programming it using your tutorial! Excellent. This crazy box project started with me trying the simple usb plug and play controller but I wanted rotaries. I tried the hacks to see it the rotaries would work on the usb board but it wasn't consistent. I ordered a "knock off" arduino at first but them backtracked to the one in the video. PERFECT. It works with my iRacing rig quite nicely!!!! 10 of 10!!!
@IronBalls007
@IronBalls007 3 жыл бұрын
Finally a video explaining this matrix stuff on an understandable level.. Thank the lords. I had to abandon my buttonbox project because nobody really explains what the code is and where to change stuff, i will start again on it right now. Thx so much. Subscribed forever!
@CARdio1203
@CARdio1203 3 жыл бұрын
Just wanted to say thank you for this video. My button box worked on the first attempt. Pure Gold!
@lancelot4915
@lancelot4915 3 жыл бұрын
Thanks a lot for this code. I´m building an F-16 ICP for BMS and was watching videos learning how to use the joystick library and the keypad library for matrix buttons programming, and the code given made all the work for me on a test with the Arduino. It was an incredible break through for me on one of the areas i´m less knowledgable. Thanks again! :)
@michaelksiezopolski
@michaelksiezopolski 4 ай бұрын
Yes you can get up to 128 buttons, only 32 will be displayed by windows, rest can be displayed by 3rd party software or are displayed in linux or mac
@JD96893
@JD96893 3 жыл бұрын
great video!!! I'm a bit of an electronic hobbyist and most Flight Sim button box videos use crazy expensive parts! Like I have seen videos of people using 3USD Arduino boards for a controller... I've also seen people using a 40USD ish board which was more plug and play although soldering was still required... Better just to build a whole kit or 2 for the same amount, i suppose you need to be a little more involved but its really not that hard and gives more flexibility!
@JQNick
@JQNick 3 жыл бұрын
Cheers bro, was chasing my head with the code of a matrix that I put diodes in. Your comments in the example helped me realise I had spent 3 hours trying to find a code error when it was actually back to front diodes :(
@KingKooba22
@KingKooba22 3 жыл бұрын
This is probably one of the better videos explaining wiring and matrixing. A Protip on coding,though. SimHUB has a click through system for programming Arduino code which makes it very easy to code for your own custom made box.
@microwar
@microwar 3 жыл бұрын
Finaly got it to work. Did some stupid mistakes on the way. First i did not see that is was not working on a Uno, Then i forgot to correct the number of rows of buttons And the last thing was a crap usb cable that only had power.
@vandoos111
@vandoos111 2 жыл бұрын
Beautiful, I not only am a newbie I considered myself as E-Dyslexic! I followed your TUT and am now well on the way to a new personalized BOX. BUT, I've connected 3 pots as shown, disabled everything but the potentiometer, and now the axis shows up but 2 of them are "in-sync" I'm guessing it's a detail on the coding modification that I probably messed up. ANYWAYS, Excellent TUT for NEWBS, Keep at it people, I've just discovered a new passion! THX a Bunch!
@dodgey99
@dodgey99 Жыл бұрын
1st THANKS. So well explained, and me and the mrs have been saying "button" in a Kiwi accent non stop - it makes us smile a lot 🙂 2nd, when you tell it how many "buttons" you have, if your matrix is missing a button, like yours is, and mine is (mins is a 4x3, with the top right corner missing one button), still tell it you have as many buttons as the matrix "could" have - or it'll not show the last button/s working in Windows. I put "11" in the code, and then windows didn't see my last button in the matrix because as far as it's concerned, that is button "12" and my code said I only have 11.
@funwithfitswell6609
@funwithfitswell6609 Жыл бұрын
If you started at 0, then 11 would be the 12th number.
@un1cus
@un1cus 4 жыл бұрын
Top class Wim, already had parts ordered to use with Leo Bodnars controller, but now I'll switch to an arduino instead :)
@joshuamarius
@joshuamarius 3 жыл бұрын
For a simple button box like this, the Leo Bodnar card will be way easier and just as effective. You only switch to Arduinos when you want the Simulator to turn on LEDs or change other hardware. Look over some of my videos, you may enjoy some of the simple projects such as adding Rotary encoders and Landing Gears :)
@christerah
@christerah 3 жыл бұрын
@@joshuamarius thx for the tip, but I made one based on arduino and its working perfectly. I did however use different arduino code as the one in this video would not work with my rotaries.
@jackbritt2424
@jackbritt2424 3 жыл бұрын
Gonna start the process tomorrow. Wish me luck!!
@marcusviccoci
@marcusviccoci Жыл бұрын
Thank you for this tutorial. Just finished my first arduino (pro micro) buttonbox and I can say, I wouldn't be able to finish it without your video :)
@--WalkerGer--
@--WalkerGer-- Жыл бұрын
I’m just designing my first button box and found your video. Awesome stuff. I love all the detail that you put in to enable people to make their own decisions based on what they personally need. Thank you so much! I had done quite a bit of research before I found you so I knew most of what you mentioned already, but this would have saved me lots of time and even then I still learned something new from you. Keep up the good work.
@aeoteroa818
@aeoteroa818 2 жыл бұрын
this is just the information i was looking for to start my switch panels
@mattjohnson6889
@mattjohnson6889 3 жыл бұрын
Hi Wim, just wanted to say how much I appreciated this video! I managed to build my own button box with zero prior coding experience. Great job brother, keep up the good work!
@oli4004
@oli4004 3 жыл бұрын
You have no idea how much this has cleared up for me. At last I might have the confidence to go for it now
@DuSlothster
@DuSlothster 4 жыл бұрын
Just a tip for anyone here new to soldering / projects like this: USE SMALL PERF BOARD(S) FOR THE POTENTIOMETERS, it is so much easier to solder wires together when you have an actual platform to do so. Also makes installing the components easier within the box itself imo The reason I say use a perf board is because I was having a nightmare of a time wiring my two potentiometers correctly, wiring two tiny wires for each the 3.3v and GRND pins was a nightmare and causing me issues (I must have burnt through 3 or 4 of them just soldering terribly on them, the arduino spits out random data from the output when you do it wrong, making the axises EXTREMELY innaccurate (obviously)). If you have encoders with no pin out board, I would also recommend a perf board for those, thankfully mines had them which was just plug and play with the arduino cables I had. My box is still ongoing, buying a larger enclosure as my current one was a bit too small (realised I needed a leonardo for the extra pins, when previously I was going to use a pro micro) and waiting on better buttons, do not buy the tiny tacile ones, big mistake on my part.
@Babyboomer_59
@Babyboomer_59 Жыл бұрын
Your video is a prize possession, thank you so much for taking the time to put together for us this video, I am currently building mine now and if not for this video, I'd surely be out of pocket purchasing a premade one. Thank you so much. Side note, I'm making my first box for American Truck Simulator / Euro Truck Simulator, I've added 2 push-pull switches for the breaks and Air supply along with a Key start switch among the other Buttons/Switches. I'll prob be making a second of not a third for other types of game play such as Sim Racing.
@dcdfm18bf18
@dcdfm18bf18 Жыл бұрын
This is the best video out there, before I had 4 videos saved so I could learn about everything about how to code the Arduino, the electronics etc. but they had very little detail. This has everything with perfect detail and explained very well! Good Job!
@smilegame3740
@smilegame3740 3 жыл бұрын
Great video, perfect and short explained. I have searched so long for this and I think your video was by far the best one I have found. Thanks!!! 😀
@Amber-si7kx
@Amber-si7kx 3 жыл бұрын
I would HIGHLY suggest using either alligator clips or some other non-soldering method to check everything works in the board wiring wise, that way when you fuck up (cause you will) the amount of time redoing everything is as simple as clipping the buttons and unplugging the leads.
@Just_lift_anyone
@Just_lift_anyone 3 жыл бұрын
I'm 7 mins in and I've learned a fucktonne already, cheers!
@sinitronics
@sinitronics 3 жыл бұрын
Something that I found recently that can save alot for those not comfortable with coding is FreeJoy library on github, it uses a STM32F103 (blue pill) instead and has a windows UI to setup what buttons. encoders , pots, hall effect sensors etc are conntected to what pin etc. Excellent tutorial though. A tip for those wanting to create one try getting ribbon cable I find that helps so much with avoiding a crows nest inside the box.
@reevesashby4185
@reevesashby4185 2 жыл бұрын
Awesome tutorial Wim. I’ve completed my 22 button, 3 rotary box and it works great. I’m going to now build another one for radar control. Cheers.
@davidmizak4642
@davidmizak4642 2 жыл бұрын
I want to thank you for the amazing information you provide to your viewers. This is fascinating material. I appreciate all of your efforts. Many thanks!
@rustyneedles3743
@rustyneedles3743 3 жыл бұрын
Ah ha, took a Kiwi to make a thorough video ! awesome mate, thanks
@FVRFactor
@FVRFactor 2 жыл бұрын
Really appreciate this video Wim - your step by step has given me a better understanding of the programming and pin outs. I've been making steering wheels for the G27 and I wanted to increase the pots and switches. Your breakdown has helped me realise this is possible. Coupled with an AMstudio tute I can hopefully easily add a joystick control on the wheel for going through the menus. Once again cheers mate.
@Babyboomer_59
@Babyboomer_59 Жыл бұрын
Hello Wim, OK well I had hit a stumble in the road, after two days for working on the box, I had completed it yesterday evening 4/3/23 so after connecting the board to PC it was not recognized, so after time of trouble shooting I gave up and went to bed, this morning I had a fresh start, I found that I had purchased the wrong board, the board I purchased was the ATmega328P in which after downloading and installing the drivers for it, Device Manager was happy with it, only still not showing up in the game controller so I then found out that this 328P does not support HID "Human Interface Device". I'm back to start again but now I know which board I need, it's a learning experience. The board I believe that I should have purchased would be the ATmega32U4 and not the 328P. Note, I had already purchased the board before finding your video, I just assumed they were all the same, not the case, they are different and it matters which board you use. I received in my mail box yesterday the exact board you're demoing in this video, my question is will it support 15 momentary, (including 3 2-way toggle switchs), 4 rotary and 3 Potentiometers? a total of 25 in all. Thanks
@funwithfitswell6609
@funwithfitswell6609 Жыл бұрын
I too learned from his video. I have 30 buttons, 4 pots and a spare pin left if that helps.( I set the buttons up on a 6x5 matrix (11 pins), 4 pots on A0-A3.) Note: an on-on toggle counts as 2 buttons. Tinkercad is a great place to test build a matrix. Good luck
@Babyboomer_59
@Babyboomer_59 Жыл бұрын
@@funwithfitswell6609 I'm up and running, thanks.
@rattler-60
@rattler-60 2 жыл бұрын
I am making a button box for DCS Flight Sim (A10C 2). I want nothing more complex than switches be they On-Off or momentary push buttons. I have completed all tasks as you have described in construction up to the wiring and tested out the bare wire switching to each individual switch using continuity for the matrix as designed. My matrix comprises 5 rows and 6 columns comprising purely on-off toggle switches (22 off) and monetary push buttons (7 off). Rows wires (5 0ff) are connected to an Arduino Nano - pins A0 .... A4. Columns wires (6 off ) are connected to D3....D8, so I am confident that the construction phase can be put to bed as completed successfully, following testing of every individual button and switch continuity. After connecting the Arduino through USB to my PC, this is where my troubles start. It only shows up as an "unspecified item" in my control panel instead of under the "Devices" collection. It shows as connected through Port_#0012.Hub_#0001 (I presume this is because my USB connector from the Arduino Nano was connected to a 7 Multiport Plug) which was automatically allocated. Right-clicking on the device does not show "Game Controller Settings" as my Hotas Warthog Throttle/Joystick and CH Pro Pedals show, so no way of testing the switching as shown in your video using the red light matrix to prove each switch. When right-clicking one of my "installed Devices" I only see The Warthog and CH Pro items listed as in the box at 26min 42secs. It seems almost as though despite following your instructions allocating pins and coding the Arduino successfully, whilst it uploads and verifies, it is not seen as installed. I have no doubt I am doing something wrong somewhere but being a 70-year-old "Noob" I can't figure out where. Is the port right? Is my programme right, I just haven't a clue over something that so many claim is basic and straightforward. Can you or anyone else Pleeeeease HELP??
@ThePowerchimp
@ThePowerchimp 4 жыл бұрын
Amazing video - well explained! For anyone put off by the coding, I recommend the Leo Bodnar BU0836X 12-Bit Joystick Board. It requires no coding - all you do is wire up potentiometers, buttons, switches however you want. Then when you plug it into a PC, windows recognises it as a universal controller with no drivers or coding needed. 8 x analog inputs, a 4-way hat and 32 button inputs. Ive subscribed - I hope you do more flight sim diy stuff!
@comet2164
@comet2164 3 жыл бұрын
Thank you I’m new. So will I still have to do 5:50 to around 14:40
@wimwamjoey
@wimwamjoey 3 жыл бұрын
​@@comet2164 No, Leo Bodnar needs different wiring and you can't make a button matrix work with them (as far as I'm aware), so this video won't help with that. There are some good instructional videos on how to make Leo Bodnar boards on KZfaq and you can also ask for help on their forums. Also, keep in mind that those boards are often significantly more expensive than Arduino.
@wimwamjoey
@wimwamjoey 3 жыл бұрын
Cheers mate! I'm looking at remaking and upgrading my button box so will probably do a new video on that, plus a DIY video on building a basic sim-pit out of an office chair.
@comet2164
@comet2164 3 жыл бұрын
wimwamjoey thanks.
@marcdraco2189
@marcdraco2189 3 жыл бұрын
It's only the mechanical rotary encoders that need a debounce. No one debounces their mouse (and no, I don't mean the buttons). Pots don't have 360 degree rotation, but that's just me being a pedantic percy.
@AlexAugustinex
@AlexAugustinex 3 жыл бұрын
Thank you so much for going through the code and explaining everything. This was really helpful.
@jeremy6529
@jeremy6529 3 жыл бұрын
Thank you for this, the way you explained it makes it much less intimidating. Can't wait to get started
@user-oz3xu4jq3y
@user-oz3xu4jq3y 7 ай бұрын
How does this man only have 2k subs, keep up the outstanding work.
@emrebahcivan5011
@emrebahcivan5011 2 жыл бұрын
thank you very much this made me understand how everything works much more than jsut making a box you are amazing sir
@rbdrifta
@rbdrifta 4 жыл бұрын
Nice Video, I happened to have just finished a button box last week and I followed Amstudios vid also, but I never understood what all the coding does. And after watching this video I feel I understand a lot more that's going on and changes I can now make, Thanks man, Ps I did use toggle switches and found out about ghosting big time, haha. Fun to learn new things though
@rbdrifta
@rbdrifta 4 жыл бұрын
I just finished my Cessna Throttle with the help of this video for the Arduino control as it was very popular in the flight sim groups. was asked to make a guide and in the Arduino section, i linked your youtube vid as it's so clear and easy to follow. hope this helps with views on your video, cheers Kris
@carlosb7929
@carlosb7929 3 жыл бұрын
Hi man!! I'm trying to use some toggle switches (with lights) but I am a bit confused on how to use / connect them. Mines have POWER - ACC - GROUND pins. I guess Power goes to 5v and ground to ground so I end up having ACC. That way , the switches are "out of the matrix" as only the columns are connected to different inputs but the row instead of going to a normal input, it goes into the 5V input.... How do you make them work? Thanks!
@-TK-421
@-TK-421 3 жыл бұрын
Great Great Great video. You are great at explaining how to use a Arduino. The only thing I did not like was this is the only video on this topic. Please make some more videos on arduinos and building things. You are great at it. I am a new subscriber. Great job.
@crownjackal2366
@crownjackal2366 2 жыл бұрын
Thank you so much for going through the code in this video!!! I'm new to Arduino and have been trying to understand the code that amstudios includes with their design guides but couldn't find anything to explain what they had done. I feel confident now in proceeding to design and make my own box now! Thank you!
@BeGeGames
@BeGeGames Жыл бұрын
You are a freaking king. Thank you for keeping it simple when explaining and the images!
@slipknotfan2217
@slipknotfan2217 3 жыл бұрын
i play ETS2 and encoders are absolutely amazing for cruise control settings
@RAYQUAZA_X
@RAYQUAZA_X 3 ай бұрын
Massive thank you for this step by step guide ! My prototype works perfectly on the first try, i just have to ptint a little box to fit all those cables and it will be good to go.
@sgabal
@sgabal Жыл бұрын
Thanks a lot, I made my own button box and it works amazing, I have 2 encoders and 28 buttons and I use it for Iracing, I wish I could send you a picture!!!!!!
@zychrias
@zychrias 4 жыл бұрын
Easy to follow, handles the basics really well. Good job!
@gunplajerk2591
@gunplajerk2591 Жыл бұрын
i got to this video and in the first 33 seconds you laid out every frustration i was having with trying to find info on this. i could kiss you on the mouth
@mountainsprings3303
@mountainsprings3303 3 жыл бұрын
Excellent tutorial on this. Thanks, just what I've been looking for.
@greentwister
@greentwister Жыл бұрын
Thanks for the video. I had first seen the other video of the ButtonBox that came at the beginning and loaded the code there. In your video I understood what was being programmed in the Ardoino IDE.
@MouldyGuitars
@MouldyGuitars 8 ай бұрын
Ok worked after a few goes. Once I worked out where to put .h files (create libraries). But only first of 3 rotaries worked initially. Then remembered you note about the first rotary MUST be on pins 0 and 1. My board didnt have a 0 and 1.. So I added a fake rotary to the code as 11st of 4 on 0 and 1 and now all 3 ACTUAL rotaries work. Hope that may help someone. Everything else worked first time :) Thanks for a very useful video.
@Recrohin
@Recrohin 7 ай бұрын
Hey there. I just got my arduino nano and was wondering the same why i didnt have any 0 and 1. Thanks for mentioning it! How did you make a fake rotary? just two blind wires?
@MouldyGuitars
@MouldyGuitars 7 ай бұрын
@@Recrohin I just configured an extra 1st rotary in the arduino code using pins 0 and 1 that doesnt actually physically exist.
@codyhubert6178
@codyhubert6178 2 жыл бұрын
Another option is to put every button on a single analog line in series. Each button (normally open) should have a resistor bypassing it, and each resistor should be different. Think B1 (button 1) has a 1 ohm bypass, B2 has a 2 ohm, B3 has a 4 ohm, and B4 has an 8 ohm. If no button is pressed you'll get 15 ohms. If button 4 and 1 are pressed you'll get 6 ohms, if B1 and B2 are pressed you'll get 12, etc. This way you use only one input and handle as many simultaneous button presses as possible without some kind of special communication protocol. Obviously you need different values than what I listed, and they are rarely going to be a power of 2. If they're far enough apart though, you can easily discern the buttons pressed. Another option is to use multiplexers. I'm designing a HOTASAS setup and I'm using a single Arduino Pro Micro. There are only four analog pins, but there are nine different analog values I need to read. I can use four digital pins to control the multiplexer and I can use a single analog pin (if I wanted) to measure every one of them! This increases latency but will not make a noticeable different if you use it correctly.
@Kimchi_Studios
@Kimchi_Studios 3 жыл бұрын
Oh custom controls for flight simmers? Nice work! Inspired me to make my own with only the microcontroller in C. Thanks for explaining the code. Check six!
@Atlessa
@Atlessa 3 жыл бұрын
(at 11:46) Oh so THAT is why you can press only 4 or so buttons on a keyboard at one time! (Eureka moment :D)
@mo0nstonegirl
@mo0nstonegirl 7 ай бұрын
Always love a good kiwi tutorial!! We're all about getting to the point 😅 Super useful info, best vid so far for sure (and I swear that's not just me being biased).
@serolrom
@serolrom 2 жыл бұрын
Wow that was much easier than I expected! So many possibilities!
@DanielRicardo42
@DanielRicardo42 3 жыл бұрын
Overall great video, but there are a couple of inaccuracies that I wanted to correct for the sake of people new to electronics and Arduino: 1. 5:40 You can't use an Arduino UNO for this task, only a Leonardo or Pro Micro. The UNO's chip doesn't support the HID functionality that allows the Leonardo or Pro Micro to appear as a Joystick or Keyboard when connected to a computer. 2. 6:33 When a momentary button is connected directly to the Arduino (without a button matrix) it only requires a SINGLE Arduino pin - the other connection goes to either GND or VCC (Just like the momentary button on the encoder - it is exactly the same). To make life easier without going into too much detail, you should connect it to GND, and define it in the Arduino code as pinMode(the-pin-to-which-you-connected-the-button, INPUT_PULLUP); And one more tip - instead of using a drawing app to make your diagram, you would be much better off using a dedicated app such Fritizing, which is completely free and super simple to use. This would make it much easier to draw your schematics, and would also result in a much nicer looking product.
@wimwamjoey
@wimwamjoey 3 жыл бұрын
Argh yes, thanks for those corrections. Had a brain fart for both those points. I'm not sure Fritzing actually is free? They ask for at least 8 euro on their website but maybe there is a workaround I'm not aware of.
@DanielRicardo42
@DanielRicardo42 3 жыл бұрын
@@wimwamjoey I actually installed Fritzing through the chocolatey package manager (highly recommended tool to manage all software on windows). However, you can also download it manually using this link: fritzing.org/download/0.9.3b/windows-64bit/fritzing.0.9.3b.64.pc.zip
@computerjantje
@computerjantje 3 жыл бұрын
Thank you very much for the tip about the Uno otherwise I would have thinking and searching my ass off. I was just about starting to build a test setup for myself using this video but now I know it has no use as my boards here are all uno's :) Thank you for saving me time and frustration :)
@BamTehBrent
@BamTehBrent 3 жыл бұрын
@@wimwamjoey I believe if you create an account, the option to download becomes visible without needing to donate. Something along those lines. I don't know if the workaround still works but it definitely used to.
@DanielRicardo42
@DanielRicardo42 3 жыл бұрын
@@computerjantje Time to buy some Pro Micros (-;
@adayonthetrail
@adayonthetrail 2 жыл бұрын
This is defintely giving me some ideas for my truck simulator. I feel like the only difficult thing for me is the sauntering of wires.
@wimwamjoey
@wimwamjoey 2 жыл бұрын
It's easier than you might think. You only need a cheap soldering iron to get started. Just watch a few videos on technique and practice with bits of spare wires until you feel confident enough to have a go with real components.
@KlimentOgnianov
@KlimentOgnianov 2 жыл бұрын
Awesome! Just a suggestion - regular retouching or vector graphics softwares are not a good choice, Fritzing is definitely times better for sketching electronic appliances. Congrats for the great video!
@GordieGii
@GordieGii 3 жыл бұрын
Aakshewallly, potentiometers typically only turn from 270 to 330 degrees. There are multi-turn trimmer potentiometers, (which typically turn 3600 degrees, or 10 turns) but you need a tiny screwdriver to adjust those. No knobs here.
@user-vn5qg6fq5g
@user-vn5qg6fq5g 3 жыл бұрын
Amazing video, I'm making a button box based on amstudio's video too and was kinda bumped out that there was no potentiometer functionality, not any more 😁
@autofctrl
@autofctrl 2 жыл бұрын
Thank you so much!! This is by far the best video I have seen in regards of building a Buttonbox. 10/10 - Great job!!
@Chris-8888
@Chris-8888 2 жыл бұрын
Big shoutout to you man!👊🏼
@Dreadbiscuit647
@Dreadbiscuit647 3 жыл бұрын
And just to add. If you hold shift while using the draw tool in gimp you can stretch straight lines instead of trying to “draw” straight lines with a mouse.
@wimwamjoey
@wimwamjoey 3 жыл бұрын
I learned that literally the day after making this video...
@Bigginger61
@Bigginger61 3 жыл бұрын
Thanks for doing this video, you made the whole thing very clear.
@pepc600
@pepc600 2 жыл бұрын
Man this video is great. Brilliant diagrams and fantastic commentary. 10 star video thanks
@FLUFFSQUEAKER
@FLUFFSQUEAKER 3 жыл бұрын
Beautiful video. Really got me into the mood/mindset to build one myself! Thanks :3
@z_polarcat
@z_polarcat 3 жыл бұрын
Woah, there is an actual place where you can buy components from
@steveneltringham1478
@steveneltringham1478 3 жыл бұрын
Ebay, very inexpensive.
@z_polarcat
@z_polarcat 3 жыл бұрын
@@steveneltringham1478 I was talking about brick and mortar
@steveneltringham1478
@steveneltringham1478 3 жыл бұрын
@@z_polarcat Fair enough, but you don't say where you are. Ebay is everywhere the internet is.
@z_polarcat
@z_polarcat 3 жыл бұрын
@@steveneltringham1478 I can buy online, but I found it interesting to see a physical place where you can buy the stuff if you’re in a pinch
@steveneltringham1478
@steveneltringham1478 3 жыл бұрын
@@z_polarcat Good luck.
@jerrylove865
@jerrylove865 Жыл бұрын
A question, and apologies if it's been asked. While a grid gives the highest number of buttons for the number of pins... what about running one wire across all the buttons and then giving an individual wire for the other post. So "directly wired" = 2 pins per button. "grid" = 2x (root of buttons) : so 4 pins gets you 4 buttons, 6 pins gets you 9 buttons, 8 pins gets you 16 buttons. "half grid" (what I'm asking about) = CountOfButtons + 1 pins That would seem to resolve the "several buttons pressed at once" issue of the matrix as there would be a unique single pin for each button.. or am I missing something. Expanded. Direct wired. Button 1 = pin 1 + 2 Button 2 = pin 3 + 4 etc Expanded. Grid Button 1 = pin 1 + 3 Button 2 = pin 2 + 3 Button 3 = pin 1 + 4 Button 4 = pin 2 + 4 etc Expanded. Half Gird Button 1 = pin 1 + 2 Button 2 = pin 1 + 3 Button 3 = pin 1 + 4 Button 4 = pin 1 + 5
@wimwamjoey
@wimwamjoey Жыл бұрын
Sure, you could do that (effectively its still a matrix but with only one row), however as you say: its an inefficient use of pins which you might want for other components like encoders and pots. If you just wanted a button box with a small number of buttons you'd be much better off using a zero delay joystick encoder which is cheaper than an arduino and doesn't require any coding.
@turntablized
@turntablized 5 ай бұрын
In this build for encoders to work they have to be 30 pole ones i tried 24 pole and nothing. Switched to 30 pole like you did use i in the build and now it works lik a charm.
@jb-enjoyment
@jb-enjoyment 3 жыл бұрын
AWESOME video!! So helpful, thank you endlessly
@haydonford8177
@haydonford8177 3 жыл бұрын
Awesome video!! Simplifies the entire process and really helped me get the result I was after. Thanks!
@activemotionpictures
@activemotionpictures 3 жыл бұрын
Thank you, sir! This video was so helpful, laying foundation and clear explanation!
@DevilbyMoonlight
@DevilbyMoonlight 3 жыл бұрын
good stuff - all I need to do now is to work out to combine the output of 2 potentiometers - i have an old set of pedals from a sidewinder force feed back wheel , and wish to have the value drop on one pedal and the value increase on the other, but both on the same axis, so at rest the throttle would be at 50% like the rudder is, I have had a go but its a challenge when your unfamiliar with the coding -
@wimwamjoey
@wimwamjoey 3 жыл бұрын
You might be able to do this using autohotkey and setting it up so that the farther the pot is turned, the faster it taps a key. It's a bit of a janky workaround though and would probably take a lot of fiddling to make it work properly
@ross-carlson
@ross-carlson Жыл бұрын
Just wanted to add another thanks, this video saved me a HUGE amount of time getting my project up and going. Subscribed.
@DuSlothster
@DuSlothster 4 жыл бұрын
Really great mate, found this on reddit. Exactly what I needed
@asdfssdfghgdfy5940
@asdfssdfghgdfy5940 Жыл бұрын
Another note with potentiometers, make sure you don't buy a logarithmic one (commonly used in audio stuff). I haven't looked at the code but it would likely be a bit janky with a log pot.
@benkeller3
@benkeller3 3 жыл бұрын
Wow best video on button boxs. Thanks for doing this.
@CorkKNIFE
@CorkKNIFE Жыл бұрын
Nice video and well paced explanation. I have most of the hardware, may try it over the weekend.
@craftymulligar
@craftymulligar 4 ай бұрын
I would either use a mega or program multiple arduino microcontroller stand alone chip sets. Also proto wire that I had seem to corrode after time and less reliable in those arduino no solder sockets. For a permanent project I would buy the crystal capacitors and atmel chips program in a uno board, transfer then solder In a different board.
@conanlovelock6941
@conanlovelock6941 3 жыл бұрын
Great video mate.. Helped me understand the matrix and coding..
@me-di9mn
@me-di9mn 3 жыл бұрын
i know it's an old video but i really appreciated it, thank youy very much man, i only have one question: i dont get how are the buttons supposed to work if none of its pins are plugged in
@wimwamjoey
@wimwamjoey 3 жыл бұрын
The buttons are connected to the pins of the arduino by the matrix. It's just that instead of having 2 pins per button, all the buttons are sharing a smaller number of pins.
@me-di9mn
@me-di9mn 3 жыл бұрын
@@wimwamjoey oh yeah I got it, but if the digital pins are giving 5 volts then the analogs are working as ground for the matrix? Otherwise where should the 5 volts go?
@hsmscuffy6947
@hsmscuffy6947 3 жыл бұрын
Yeah I have the same question. Are all of the voltages floating? I don't see and pull up resistors or pull down resistors. I know you can set some digital pins to be pulled up through software but I just don't see how the analog pins can get a voltage reading when they're connected to an open wire. Wouldn't the signal just be noise?
@wimwamjoey
@wimwamjoey 3 жыл бұрын
I don't actually know (I cribbed this together from various articles and videos, I'm not that experienced with arduino) but I expect the answer is that it's all handled through the keypad library, not in the code you can see in IDE.
@panicpetes7676
@panicpetes7676 3 жыл бұрын
Yes, it's all handled by the keypad library. They use the pullup resistors integrated into the board. It actually makes no difference if you use analog or digital pins for this, as all analog pins can also work as digital ones. If anyone is interested in the programming, you can check the source code of the keypad library here (the pin write/read operations start at line 83): github.com/Chris--A/Keypad/blob/master/src/Keypad.cpp#L83
@robertrose7645
@robertrose7645 2 жыл бұрын
Thanks this Video is the only reason I got my stuff working
@GordieGii
@GordieGii 3 жыл бұрын
Ghosting can happen by pressing just two buttons at the same time, if they are on different columns AND different rows. e.g. If you press the button on column 1 and row 1 and press the button on column 4 and row 3 at the same time, the controller will think you also pressed the buttons on column 1 and row 3 and on column 4 and row 1. This can be avoided by adding a diode at each switch. Perhaps our host will explain how in another video. (but that would require explaining how matrix scanning *actually* works)
@wimwamjoey
@wimwamjoey 3 жыл бұрын
This video is intended for people with zero experience who want to build a button box. It's not intended to be a full lecture in how all the electronics actually work.
@GordieGii
@GordieGii 3 жыл бұрын
@@wimwamjoey I understand that, and it's a great video, but how much harder to say or understand is it to say "ghosting can happen when you press two buttons at the same time" than "ghosting happens when you press *more* than two or three buttons..." And I don't think it would be that much harder to understand "the controller turns on the rows one at a time, and checks whether any columns come on at the same time." That way, if you ever want to explain the use of diodes in a later video you wouldn't have to explain that you -lied- oversimplified in this video. I imagine you expect your viewers to progress with time, yes? If you say that the controller recognizes when a column input and a row input come on at the same time, then as they start to understand how electricity works it is going to confuse them.
@GordieGii
@GordieGii 3 жыл бұрын
@@wimwamjoey I'm sorry, I just realized, your channel is a gaming channel, not an electronics channel. Few if any of your viewers would care at all how it works, or progress, or be any more confused, in their understanding of electronics.
@clxudzYT
@clxudzYT Жыл бұрын
Exactly the tutorial I was looking for!! Thanks!
@geoffwallick
@geoffwallick 21 күн бұрын
you can use a toggle switch by assigning 1 button press and a timeout for each position.
@wimwamjoey
@wimwamjoey 21 күн бұрын
@@geoffwallick can you explain how you do that I the code? Im a complete novice and couldn't figure this out at the time I made the video.
@jcdock
@jcdock 2 жыл бұрын
I had to double take when I heard Kia ora. Great to see another kiwi,
Magnetic Switches - for $20 each!
20:42
The Warthog Project
Рет қаралды 385 М.
The $2 Backlit Button Panel: Simple Method For Flight Sims and More
8:50
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 38 МЛН
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 42 МЛН
ISSEI & yellow girl 💛
00:33
ISSEI / いっせい
Рет қаралды 20 МЛН
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 43 МЛН
Flight Sim Basics (Part 1): Connecting a Switch
11:27
The Warthog Project
Рет қаралды 75 М.
DIY Sim Racing Button Box | Cheap and Simple!
4:26
Chris Haye
Рет қаралды 156 М.
Instructions - Button Matrix
12:47
Real Robots
Рет қаралды 55 М.
Button Box with Key Start for Simulators | DIY | Vehicle Sims
8:16
That Bengineer
Рет қаралды 195 М.
How to use rotary encoders
14:12
FriendlyWire
Рет қаралды 32 М.
DIY Flight Simulator Joystick
9:10
Tom Stanton
Рет қаралды 1 МЛН
Build Your Own Button Box
11:09
OverKillSimulations
Рет қаралды 92 М.
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 38 МЛН