Тёмный

#25 Scrolling Characters on an LED Matrix using a MAX7219 

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

Sending characters to an LED Matrix to create a scrolling message is child's play when we use a standard library to do all the hard work for us.
This video shows you how to connect four LED matrices together and produce scrolling messages - either predefined or what you type in on the serial port.
This really is a plug-and-play type operation that can really add the WOW factor to your project for very little outlay, either in terms of cost or programming effort.
If you want to delve deeper in understanding how to create your own (scrolling) characters you'll have to wait for part 2 of this video in the coming weeks (that is, it's not going to be my next video, sorry).
-------------------------------------------------------------------------------------------
LINKS LINKS LINKS LINKS LINKS LINKS LINKS
-------------------------------------------------------------------------------------------
And here are the links you'll probably want to download if you are following this video:
Maxmatrix library, Sketch Demo code and the All_Letters demo sketch are here:
github.com/Ral...
Above MaxMatrix library MAY be the same as this one here in Github:
github.com/riy...
Enjoy! Anything unclear? Leave a comment below.
As always, Thanks For Watching - and spread the word so my subscriber numbers start increasing!
And my channel is here:
/ ralphbacon
How can I remember this? Memory tip: "See" Ralph Bacon, geddit?

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

 

6 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 72   
@daklakdigital3691
@daklakdigital3691 4 года назад
Your hard work and expertise is appreciated.
@RalphBacon
@RalphBacon 4 года назад
Thank you for saying so, it's also much appreciated that you took the trouble to post here. :)
@grumpybstard974
@grumpybstard974 8 лет назад
Thanks for your expertise and time in uploading these tutorials
@RalphBacon
@RalphBacon 8 лет назад
+Grumpy Bstard You are most welcome. I'm glad you're finding them useful. New videos more or less every week, sometimes more often! If you have a particular area you think would make a useful video don't forget to suggest it.
@diegotanner3831
@diegotanner3831 3 года назад
I know it is quite off topic but does anybody know a good website to watch new tv shows online?
@barrettfrederick12
@barrettfrederick12 3 года назад
@Diego Tanner i would suggest flixzone. You can find it on google :)
@kemalozkul747
@kemalozkul747 6 лет назад
Hi, Ralph, i'm new to programming and i try to understand how libraries are written. After watching your instructif video over LED Matrix with MAX7219, i decided to look inside to LEDCONTROL librarie files. I thought it is going to be easy to understand the coding but it is not like blinking a led :) you know i mean... Especially ledcontrol.ccp file is getting me crazy with his spitransfer fuction. Could you make a explaining video over Ledcontrole libraries in the futur please. Thank you
@RalphBacon
@RalphBacon 6 лет назад
Hey Kemal! Happy New Year! To understand how libraries work why not work your way through my video #71 How to create an Arduino Library - easy! Don't just watch the video, actually do it. That way you will learn lots and probably be able to understand other libraries too. Give it a go!
@kemalozkul747
@kemalozkul747 6 лет назад
Hey Ralph! Happy New Year too! I did watch (6 times) your library making video. I realized that i asked wrong question, sorry about that. i know how to create simple libraries but i wanted to learn further about programing and i decided to look inside the others people codes. They make amazing codes that you can not learn from programing books. So i return to my question or questions: Some of the coding lines are chinees for me, like: This is the last function in ledcontrol.ccp //void LedControl::spiTransfer(int addr, volatile byte opcode, volatile byte data) { //Create an array with the data to shift out int offset=addr*2; /// Why multiplication is used?//// int maxbytes=maxDevices*2;/// Same thing hier . Why *2 and not *3?//// for(int i=0;i
@RalphBacon
@RalphBacon 6 лет назад
I have come to realise, Kemal, that a *short* programming video every now and again might be of benefit to many. You have endorsed that belief. So I will consider doing if I get the time. Thanks for the question/suggestion!
@mahivalgohil4710
@mahivalgohil4710 7 лет назад
Hey Ralph, Nice video. You are my teacher, I started make display after wathching this video. I used 5 display (8*40). Now I Want to make this display big like 16*40. Suggest me ...How i do Its Wiring? and which code upload ?
@RalphBacon
@RalphBacon 7 лет назад
Mahival, have a look at the comments under video #80 Scrolling LED Matrix MAX7219 *Updated* which contains some suggested links (by others, not me) where you can define segregated areas and build up very clever displays.
@fabrice26306
@fabrice26306 7 лет назад
Hi Ralph, I'm a new subscriber since today, nice channel you have here ! So without any further delay, here's my first question... did you get any more info about the 4in1 LED 8x8 matrix (the one with the orientation issue) ?
@RalphBacon
@RalphBacon 7 лет назад
Hi Fabrice, welcome to my channel! It is my continued regret that I did not manage to find the time to write the code for that 4-in-1 display, which mocks me from my components box on a daily basis. However, it has not been forgotten. It's still (way down) on my backlog. Perhaps I just need to take a couple of hours out and try to do something with this, if I do I'll let you and everyone here know, of course. Thanks for the nudge on this and for your post.
@fabrice26306
@fabrice26306 7 лет назад
Hi again Ralph. Well, I just found something useful, a library that makes it possible to scroll text from right to left on a 4 in 1 LED 8x8 matrix. You will need the "MAX7219_Dot_Matrix" lib plus the "bitBangedSPI" lib by Nick Gammon!
@RalphBacon
@RalphBacon 7 лет назад
This is so interesting that I'm going to have a go. Thanks so much for the heads up. If I'm successful in putting this together, and include a demo in a future video I may mention & credit your username unless you tell me otherwise!
@RalphBacon
@RalphBacon 7 лет назад
Well, I got it working after a while; whether the Arduino compiler has moved on, or the Eclipse IDE I'm using is MUCH more picky about things I don't know, but I had to make a few changes to the library code. But it now is working, smooth scrolling on that 4-matrix MAX7219 device with just the single cable entry. I've very tempted now to buy further ones to expand the display area (depending on price)! ----> If you do this on the Arduino IDE I will be interested to know whether you get compiler errors or whether it just sails through. If I get time I might transfer the project to the Arduino IDE just to compare. Thanks again for giving me the heads up, brilliant collaboration between Arduinites.
@fabrice26306
@fabrice26306 7 лет назад
I'm using the usual Arduino IDE 1.8.1 and all the demo's were working without any changes to make. I'm planning to make some clock/ weather station with it.
@andrewspaulding7970
@andrewspaulding7970 6 лет назад
Great video! I have controlled these with the UNO and other programs in the past. I am looking to run this program that you have graciously provided with a Arduino Pro Mini. Any reason this shouldn't work the same way? Thanks!
@RalphBacon
@RalphBacon 6 лет назад
Thanks, Andrew! I can't think why that would not work with a Pro Mini if you have the 5v version. I cannot tell at a glance whether the 3.3v version would be able to drive the matrix (I suspect so, but best to check). I just find the programming using a USB to Serial dongle a bit fiddly, and prefer the Sparkfun Pro Micro USB version. And do check out the updated video #80 which covers this topic in more depth. Thanks for posting.
@andrewspaulding7970
@andrewspaulding7970 6 лет назад
Ralph S Bacon , for some reason, by first two boards in a series of six were all garbled. I suspected a hardware issue so I swapped them out, still had the issue. I tried a different program that I used previously and it worked. Long story short, these boards indeed work with the 5V pro mini. As far as your program, I claim user error on my part. Great video and thanks for sharing/replying!
@RalphBacon
@RalphBacon 6 лет назад
Thanks for your post, Andrew, glad it worked out and good to hear from you.
@aaweso_me5200
@aaweso_me5200 7 лет назад
Great video. sad it has ONLY 700 views. sad. Subbed, Thanks for this video (useful for a 12 year old)
@RalphBacon
@RalphBacon 7 лет назад
Hello, er, Err! Ha ha! Really glad you liked the video, and yes, shame it's had only a few views. But maybe this time next year it will have increased 10-fold, who knows? Thanks for subbing, I hope the rest of the videos are just as useful to you and anyone else who's not 12 years old!
@jumbo999614
@jumbo999614 4 года назад
4:40 Can't you just use the library to make scroll left and right? I'm going to buy one but i really want left and right scrolling ability.
@RalphBacon
@RalphBacon 4 года назад
Not using _that_ library, Paul, but there are others that do this. It's complex to do which is why better featured libraries are required. Have a look at my other MAX7219 videos (use the searchable pdf file in my most recent videos' description) to see whether I mention them.
@kemalozkul747
@kemalozkul747 6 лет назад
Hi Ralph, your sketch demo code link doesn't work anymore, can you fix it please. Thanks for nice videos, i'm learning a lot...
@RalphBacon
@RalphBacon 6 лет назад
Fixed! Thanks for letting me know, Kemal. The new links are in the video description. Caused by DropBox removing the "public" folder, so everything is now in GitHub.
@yungschastn3032
@yungschastn3032 7 лет назад
Hey Ralph, I am using the raspberry pi and I wanted to ask you: does it work with the raspberry pi 3 in the same way or is it way different? I am also using the max7219 leds :)
@RalphBacon
@RalphBacon 7 лет назад
Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July. The principle will be the same but the library I'm using is only for the Arduino. But if you look around I bet there are libraries just for the Pi that also do this. Good luck in your search!
@yungschastn3032
@yungschastn3032 7 лет назад
Thank you but I already found a library vom rm-hull :)
@RalphBacon
@RalphBacon 8 лет назад
And here are the links you'll probably want to download if you are following this video: github.com/RalphBacon/Scrolling-Characters-on-an-LED-Matrix-using-a-MAX7219 Enjoy! Anything unclear? Leave a comment below.
@mickleuk
@mickleuk 6 лет назад
Ralph S Bacon The Dropbox files don’t seem to exist any more.
@RalphBacon
@RalphBacon 6 лет назад
Sorry, Mickleuk, I missed your comment, but now Fixed! The new links are in the video description.
@Maxybon5
@Maxybon5 5 лет назад
Where is part 2?? where you demonstrate how to create your own character sprites
@ricardotolliver6111
@ricardotolliver6111 7 лет назад
Ralph, I've checked the attached links for the sketch you used in the video and was unable to find it. Can you provide it?
@RalphBacon
@RalphBacon 7 лет назад
Hello Ricardo, I've just checked those links (in the video description) and they appear to work fine. Note that the zip file downloads automatically in your browser (so nothing much appears to happen except that you have downloaded a file in the background). If you're still having problems after re-checking let me know and I'll put them up on GitHub, OK? Just had a thought: am I using a demo sketch in the video that I have not made link to? Let me know the name of the sketch (or the position in the video) and I'll immediately make that available.
@ricardotolliver6111
@ricardotolliver6111 7 лет назад
Ralph, thanks for getting back to me. I checked the RU-vid links again and still was unable to find the Sketch used in the "#25 Scrolling Characters on an LED Matrix using a MAX7219" video.
@RalphBacon
@RalphBacon 7 лет назад
OK, leave this with me Ricardo, I'll see what I can find over the weekend and update the link here (and in my video description). As it's been a while since this video I shall have to reacquaint myself with the sketch!
@RalphBacon
@RalphBacon 7 лет назад
OK, at video position 7:14 I use a sketch "All_Letters" which I've now uploaded to DropBox. The details are in the video description now as well as here: www.dropbox.com/sh/ji2r9haem9o1vny/AAC-DF-8v-lrrt0dgDBtNVO8a?dl=0 I can't believe you're the first person to notice this, well spotted!
@garymetheringham4990
@garymetheringham4990 6 лет назад
Hi, have you tried th MD_MAX72xx library for the blue 8x8 x4 led module? ps you need to edit the library .h file to tell it what display your using it took me an hour or so to find it. has some good effects if you install. his paralo additional library
@RalphBacon
@RalphBacon 6 лет назад
I've added this to my 'investigate' list as I've not seen the blue led arrays (sound nice) but I have, I believe, watched a demo of the library you mention (very sophisticated wipe effect, split screen etc). Thanks for the heads up, Gary.
@garymetheringham4990
@garymetheringham4990 6 лет назад
Ralph S Bacon defo worth a look. had a few head scratching moments whilst munging dh11 rtc and barometric pressure sensor code into it to get sensor data to display.😞🤔
@vinspiritl2732
@vinspiritl2732 4 года назад
Hi im new to arduino coding. As i was trying out the codes for this maxmatrix library, it seems to show the error of maxMatrix library is not found but i have already included them in the arduino library. I'll appreciate any help :)
@RalphBacon
@RalphBacon 4 года назад
Have you added the following line at the top of your sketch: #include Don't forget the ".h" part of the file name or it won't find it.
@AsifIqbal-sj1ct
@AsifIqbal-sj1ct 7 лет назад
sir how to add hc-05 by updating this code? i want to connect Bluetooth module for sending text .
@RalphBacon
@RalphBacon 7 лет назад
Hi asif! I have just the video for you: look at my videos #36 & 37 which describe exactly how to communicate with an Arduino using your phone and Bluetooth, works like a dream. Here are the links you need: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7XdSGU_W4ho.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7FN3f9Y4yJI.html Have fun, it is not difficult but will require you to program both for the Arduino and your phone, all shown in detail.
@Gaatech
@Gaatech 6 лет назад
i am having trouble finding the LIB for this #include
@RalphBacon
@RalphBacon 6 лет назад
I'll assume you're using the standard Arduino IDE above version 1.0, Gaatech. In which case you don't need this library explicitly, it's already included as part of the standard Arduino set of core libraries. It's used to write to EEPROM memory, I hope this clarifies this. Good question, thanks for posting.
@Kwikwik
@Kwikwik 7 лет назад
thank you
@RalphBacon
@RalphBacon 7 лет назад
No problem, I hope that was the solution for you!
@Kwikwik
@Kwikwik 7 лет назад
max7219test_scrol.ino:29:23: error: variable ‘CH’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’ What to do?:(
@RalphBacon
@RalphBacon 7 лет назад
Hello Kwikwik! That example sketch was not written by me as it was included in the library. So it is quite old and the Arduino compiler is becoming more strict with what it will accept these days! If you are not already using Arduino IDE 1.8.1 I can only recommend you do so (because I received a different, albeit related, error). Just replace the line 29 to read: PROGMEM const unsigned char CH[] = { and all will be well. You may receive two more red warnings in that library but it does not stop the program compiling. If you want to stop those errors find the MaxMatrix.h file in the library folder and change line 34 to: byte buffer[81] but this is optional. This resolves all issues with this library. I'm going to do a new video on the MAX7219 scrolling text using the 4-in-1 LED arrays soon so stay tuned!
@Maxybon5
@Maxybon5 5 лет назад
wheres part 2????????
@RalphBacon
@RalphBacon 5 лет назад
Check out video #80, I'm not sure it's part 2 but it does expand on things a bit.
@MrCatchers
@MrCatchers 7 лет назад
Hi Ralph, Great video thank you. I have run your code using 5 display units (changed line 115). The last two (those on the left) work fine, but the first three are just showing randon patterns. I assume that because the last two are working then the wiring must be correct so wonder if I might have some faulty units. Any thoughts? I have swopped the 7219 around from a display that working to one of the ones that not and the result is the same. If you have some pointers I would be very grateful.
@RalphBacon
@RalphBacon 7 лет назад
Hey there MrCatchers! I have four of these running so I'll have a look at the code and ensure it runs and let you know where to find the sketch. That said, there will another video soon on the 4-in-1 versions of these devices which works *much* better (and no wires!) so stay tuned! I'll get back to you regarding the ones you already have (and which I have too).
@RalphBacon
@RalphBacon 7 лет назад
I'm back! I've got four of these units working with that sketch (MAX7218_LED_All_Letters.ino) but I haven't got a fifth to add to them (not until my new ones arrive later this week). Can you get it working properly with just four units? The wiring can be a bit of a "gotcha" so double check that too. Let me know whether four units work OK for you, that's the first step, I think.
@MrCatchers
@MrCatchers 7 лет назад
Ralph thanks for your prompt reply, very much appreciated. Turns out it wasn’t the wiring but LED array orientation. In order to facilitate mechanical fixing to my board I had removed the arrays. I worked on the assumption (very bad practise, I know) that they would work either way round. What was I thinking? So what turned out was that the first three display units had their LED matrix the wrong way round. Warning to the unwary, mark them before removal. The sketch is working well with 5 display units, but interestingly ‘maxInUse’ has to stay at 4. If I change it to 5 then the first display unit in the chain (the one connected to the Arduino) has a corrupt output.
@MrCatchers
@MrCatchers 7 лет назад
On closer inspection with maxInUse set to 4 the left most display is actually displaying a string independent of the first 4 displays, changing maxinUse to 5 corrupts the first display.
@RalphBacon
@RalphBacon 7 лет назад
This is "interesting" in a OMG-I-don't-know-what-is-wrong way! But my new matrix display will be turning up soon so I will be able to check what happens when I connect a fifth one up, so bear with me for a few days and I will get back to you. But I'm glad you got the orientation of the LEDs sorted, as you say it's easy to turn them round.
@josephnicholeflores3392
@josephnicholeflores3392 7 лет назад
Error compiling for board Arduino/Genuino Uno. how to fix
@RalphBacon
@RalphBacon 7 лет назад
Hey Joseph! Sorry to hear you're having problems, what's the error? Same one as reported by Kwikwik three days ago? See my response to that post and see whether it fixes your problem too, otherwise reply to this with the error message you're getting.
Далее
#24 Four ways to RESET your Arduino
24:56
Просмотров 113 тыс.
#80 Scrolling LED Matrix MAX7219 *Updated*
30:16
Просмотров 17 тыс.
You Said I Was a Fool - Panasonic 4K Blu-ray Player
12:14
MD Parola library for the Max7219 & Arduino
7:12
Просмотров 53 тыс.