Arduino Forum

Community => Gigs and Collaborations => Topic started by: Kevinn1995 on Mar 14, 2019, 08:49 pm

Title: Request code buttonbox
Post by: Kevinn1995 on Mar 14, 2019, 08:49 pm
Hello guys,
I have a project going on, making an Arduino Micro based button box. The box was completed 3 months ago, but I can't figure out how to code the thing properly. I tried with different premade sketches, mainly because I don't know anything about coding an arduino and don't want to go through the hassle of learning everything for just this one project as I don't have that much free time to start from zero. (Yeah you can call me lazy)
3 months later I'm beginning to think I made a mistake making the box with an arduino instead of a simpler arcade board or something.
I've come to a point where I'm willing to pay someone (depending on the price) to make me a sketch.
The main problem here is getting the toggle switches to work like they should. Sending one keystroke each time the switch changes state. So flip up is one keystroke, flip down is one keystroke.
I'll include the scematics I made. It's in paint so it's not perfect but should give you an idea how the layout is, how I wired everything and which buttons i used.
Kind regards

Title: Re: Request code buttonbox
Post by: patduino on Mar 14, 2019, 11:41 pm
Hi Kevin,

I can't quite tell from the picture whether the switches are in a matrix row/column arrangement.  Is that how you built it?

Pat
Title: Re: Request code buttonbox
Post by: wvmarle on Mar 15, 2019, 09:20 am
Looks like a matrix indeed but the arrangement makes it very hard to really see how everything is wired. If it's a matrix it should be quite straightfoward to get to work. It does seem to be an incomplete matrix: some of wires are connected to three, others four, or even five diodes/switches.
Title: Re: Request code buttonbox
Post by: Kevinn1995 on Mar 15, 2019, 01:49 pm
It does look a bit like a mess tbh, but it's indeed wired in a matrix with 21 buttons, so a 5x5 with the last matrix only 1 button. The layout matches the box, so it's excact the same. I made the scematics so I could easily follow everything. Also I've wired a diode infront of each button to prevent ghosting when more buttons are active at the same time.
Title: Re: Request code buttonbox
Post by: wvmarle on Mar 15, 2019, 02:37 pm
That should be pretty easy to read with the existing matrix libraries.