Тёмный
No video :(

#13 Matrix Membrane Switch (12-key 4x3) an Arduino PLUS a LED MAX7219 display 

Ralph S Bacon
Подписаться 54 тыс.
Просмотров 4,8 тыс.
50% 1

We can put into good use the lessons from previous videos using the MAX7219 LED display with this new Membrane Matrix 12-key Switch (4x3 layout) to create an interesting method of entering data.
Some simple code lets you capture the keypresses and do something meaningful with that data, such as displaying the numbers on the LEDs.
Easy! And you can do this in an hour, yes, really.
Code samples are here: www.dropbox.co...
And my channel is here:
/ ralphbacon

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@RalphBacon
@RalphBacon 8 лет назад
The code samples (first for the simple Matrix switch reader, second for the completed project) can be found here: dl.dropboxusercontent.com/u/20622434/Membrane12KeySwitch_CodeSamples.zip
@clarkso65
@clarkso65 4 года назад
You said that "the Code samples are in the comments below!"?? I scrolled down and did not find any. Would you be kind enough to post it here? Thank you
@RalphBacon
@RalphBacon 4 года назад
This video is getting on a bit now and DropBox moved my files in the interim so I've moved them back. The description is updated but makes a reference to zipped files here: www.dropbox.com/sh/c86ko18p7xzuldu/AADbCqe8WzFbxVOtPrFNyae7a?dl=0 Let me know if this isn't what you expected, Clark.
@clarkso65
@clarkso65 4 года назад
@@RalphBacon Thank you for your quick reply. I appreciate your kindness so much. I have been watching videos in the internet for almost 10 years and never did I found a tutorial with so much detail and clarity. Thank you for sharing your knowledge,
@mariodelgado6890
@mariodelgado6890 7 лет назад
It is possible to connect a bigger LED display, let say 5 inches that shows the same information that shows the MAX7219 as a parallel display?
@RalphBacon
@RalphBacon 7 лет назад
You could connect an LCD [touch] screen (see video #83), Mario, and send the same information to that screen as you do the MAX7219 display. But the screen I use in that video is not a 5" screen, it's something like a 3.2", because bigger screens get expensive very quickly and you have to ensure that the screen's driver chip is supported in the Arduino community via a library. Bigger screens are more common (but no less expensive) in the Pi world. Have a look on the Far Eastern web sites (Banggood, Aliexpress etc) to see what the biggest screen is available to use.
@sum47
@sum47 5 месяцев назад
How would I go about adapting this to the MAX7219 dot matrix modules?
@sum47
@sum47 5 месяцев назад
@RalphBacon I've fiddled with this for a few days and I can't seem to convert it to the dot matrix MAX7219 modules. Is it possible for you to help me?
@RalphBacon
@RalphBacon 4 месяца назад
You need a different library (probably) to control an 8x8 dot matrix module. I did a video on it somewhere (pdf of all my videos in the video description of all recent videos).
@sum47
@sum47 4 месяца назад
@@RalphBacon Thank you for the reply. I eventually sorted it out using the Parola library. Your videos are great. I'm just very inexperienced at coding.
@stevdogvan
@stevdogvan 8 лет назад
Hi Ralph, I enjoy watching you tutorials and i have a lot of interest for this one, try as i might, I cant understand how you have created a 4 digit buffer, is it possible to extend this to 8 digit, if so, how. also would this program work if i was to use 3 max7219's, cheers, steve
@RalphBacon
@RalphBacon 8 лет назад
+Stevdogvan Cherry Let's see if I can help you along the way. The message buffer is defined in line 22 byte with msgBuffer[4], initially set to spaces. When we get a key press we shuffle all the values in that msgBuffer to the left (so the leftmost disappears) and the new key value is stored in msgBuffer[4] (the rightmost), at line 78 to 81. Then we just output the msgBuffer to individual LED characters in lines 84-87. So to extend that to an 8-byte buffer just increase the definition in line 22 to msgBuffer[8] and change the loop counter and variable in line 85 to read (for (int cnt=1, bcnt=7, cnt < 8; cnt++, bcnt--). Why do we use 7 and not 8 here? because the array starts at position zero. So position 0 through 7 gives us 8 bytes. - Video position 12:45 describes how the digits are moved along to the left, you just need to extend it to use an 8-byte buffer and all the digits on the MAX7219 board. Video position 13:20 describes the rather confusing aspect that the digits and buffer are in a reverse order (the first digit on the board is digit 8 not 1). - I'm afraid using three max7219s is beyond the scope of this video - you can do it but I'd get one working with 8 digits first if I were you! Anyway, I hope this helps you get your project moving forward!
@stevdogvan
@stevdogvan 8 лет назад
Thank you for your help, so far it is doing exacly what i want, had to change line 22 to 9, then on line 85 bcnt=8 and cnt
@spherezog
@spherezog 5 лет назад
Thanks, but where is the code ? There is not code ? thnaks very much.
@RalphBacon
@RalphBacon 5 лет назад
The code was hidden by Dropbox a long time ago, TomTom, but if you follow this link you will find the file you need (zipped): www.dropbox.com/sh/6n07oa81jggxubi/AAD7Z5w-uAP_avOFMCSLN8kOa?dl=0 The file you need is Membrane12KeySwitch_CodeSamples.zip Let me know if you have any difficulties finding or accessing it.
@stevdogvan
@stevdogvan 7 лет назад
Hi Ralph. really struggling to make 3 max7219's display numbers entered on the keypad, Is it possible with this program or should I I seek some other method ?. cheers steve
@RalphBacon
@RalphBacon 7 лет назад
+Stevdogvan Cherry This will work but you do need to address each MAX7219 individually - they each will have a unique hex address. Use the I2C scanner sketch that I've attached (or just search with Google, you'll find an equivalent) so you know what the address is. If all your MAX7219s have the SAME address then you must determine how you can change that address. Off the top of my head I don't know this must usually there are some solder pads marked A0, A1, A2 or similar which can be bridged with solder and this changes the I2C address. Have you got the sketch working with a single MAX7219 yet - that's your first step, of course?
@stevdogvan
@stevdogvan 7 лет назад
Hi Ralph, thank you for your time, yes the sketch works great, just need the extra digits. The max chips I have are not i2c, they are spi. Cheers Steve
@RalphBacon
@RalphBacon 7 лет назад
Just confirm to be the following: 1) How many MAX7219s are you hoping to address? 2) How many digits do you want to display on (each) MAX7219? When I have your answers I will see if there is a quick solution...
@stevdogvan
@stevdogvan 7 лет назад
Hi Ralph, I am trying to use 3 max 7219 displays so i can use 18 digits, the rest i can just blank off. What i like about your program is the way that when new digits are entered onto the keypad the old numbers roll of the edge of the screen, the effect would be like a scrolling numeric display that only scrolled as new digits are input. when the sports club asked me if i could do this I thought it would be easy, I must be mad, Im doing this for free. Cheers steve
@RalphBacon
@RalphBacon 7 лет назад
Yup, you and me both (doing it for free)! Let me see if I can give you example code this evening that will enable you to use all digits on one of the displays at least; I think you might have to treat the displays separately (that is, 3 lots of 8 digits) but maybe not, I'll have to check (but I'm not sure I even have more than one display with which to test this). Leave it with me for a day or so (I will have more time at the weekend of course) but nudge me in a day or so if you hear nothing here.
Далее
Welcome! This is my YouTube Channel Trailer...
1:15
Просмотров 36 тыс.
Keypads
18:15
Просмотров 15 тыс.
#29 Essential Arduino Workbench tools
13:44
Просмотров 6 тыс.
My favorite debugging tool (Logic analyzer)
7:56
Просмотров 2 тыс.
[13]SNUBBER CAPACITOR CALCULATION
8:37
Просмотров 12 тыс.