 This right here is an LED dot matrix. It has 64 LEDs, 8 rows, 8 columns. And when you light up different ones you can start to draw an image, text, or any basic information. So in this video I will show you how this thing works, how to write the code for it, how to wire it up, everything you need to get started. If you enjoy this type of content give the video a like and subscribe to the channel to see more reviews and tutorials on different electronics such as these. Also let me know in the comments what you want to see next. LED matrixes tend to come in three different types or models. First dimension ones where it's just one rows of LEDs so things that are usually used to kind of show audio or zero to a hundred percent where they light up progressively. Then you have two dimension ones like this one where it's two rows that make a 2d plane and you can draw 2d things like the smiley face here. And then you have three dimensional ones like this one but stacked on top of more versions of itself until you make a cube. So LED matrixes are really just a bunch of single LEDs connected in a format. For ones like mine right here it's a grid of rows and columns across and up and down. When you want to light up a single LED in a single location like let's say we want to write up the top right corner this one right here where my finger is. We have to give power to this row right here and then to this column right here and that will light up that single LED. Now because of that we can only light one LED at a time. But what you couldn't tell when I was doing that little animation earlier in the video is that all those LEDs were actually firing off on their own and only one at a time. Because it happens so quick at such a high speed our eyes can't pick it up even cameras will struggle to pick it up so that means we can light up a whole board while actually only lighting up one LED at a time. It's actually really similar to how keyboards work like this one right here. When I press for example the H here it goes through this row and then that column. When it comes to use cases these things aren't really used in any professional setting they're just not really efficient you can't put a lot of the screen you're kind of limited to these weird you know 8-bit type animations. You have other matrix type devices like this one right here which you might have seen on old school microwaves but even then that's not enough you need more stuff to display on the screen you also have this which is also just one then we also have the LCD display we did in the last video. So when it comes to professional use cases these are not that great but what's cool about these is a lot of them like mine right here come with two ends and you can actually take multiple and stack them together and make this big billboard style animations which people use for some projects. When it comes to actual specific matrices there's usually two different types there's one like mine which comes with four or five pins and then inside you can't really see it but between the board let me see if I can focus it up between the board right there not where those connectors are but in the middle there it's very hard to see I'll put an arrow up on the screen but right inside of there there's actually a chip for controlling this because if you had one of these raw like this one right here you would have to connect to each pin individually like they do right here so you can see there's eight pins up here and eight pins down there that's the rows that's the columns but because of that chip in here it allows me to control this board with a lot less code with a lot less wiring because I don't want to do 16 wires I want to do just five so if you don't have one like mine where there's a chip inside and it's just the raw matrix board I have a second set of code in the description for you to open up and go do but wiring up is the same thing you're just gonna have to wire up the rows and the columns instead of wiring up a control pin a power pin a ground pin etc if you have one like mine then you can continue with the code I'm going to show you right now so when it comes to wiring up it's really simple we've got five cables the first two we're going to do is power and ground so power is going to go to vcc then we have ground which is going to go to gnd then we have din oh I have some stuff running on this I'm just going to unplug it then we have din which is going to go to 12 on the board then we have clk which is going to plug into 11 and then we have cs which is going to plug into 10 the first step as always is to include any libraries you're using so in ours we're going to be using two different libraries led control and binary dot h you shouldn't have to install binary but you should have to install led control so just go over to your library manager put that in and then install the one by eberhard then the next step is to go and declare your led control your matrix and in our case here are all the cables we're plugging into 12 11 10 and then one you're not playing into but that's usually the reset pin then we're going to declare a variable called delay time this is going to be how long we want to wait between animations the reason we're putting it up here is so that we could change it once instead of having to change it four or five times down in our loop I'll make sure to have this part down in the description it's just our pre-made faces the way this works is each one of these is a row and then wherever there's a zero it means off wherever there's a one that means on so in the top row there's eight leds the first two will be off the middle four will be on and then the last two will be off making eight and then repeat that for every single shape so if you wanted to make a letter which I think we should do at the end is we'll go and actually copy paste one of these and make our own in the setup it's pretty simple we have to do a little shutdown here to start the code we have to set our brightness we're going to set it to an eight this is a comma right here this is in the point so it's zero and then eight and then we have to clear display which means if there was any previous led setup on it we want to restart it and then do this one when it comes to setting an led on or off you have three different options you can either set an led one specific one manually so you would do you don't really need the address but you need the row the column in the state the state being zero or one zero for off one for on if you want to do the whole row or column at once you could do what we did earlier here which is doing this little bit here which as I went over zero zero means off off and then four ones means four leds will be on in the middle and the last two will be off again because of the zero zero so if you wanted to do something like that you could do that right here in set row and take care of the whole row at once instead of going one by one with set led now let me show you an example this right here is our sad face and it's using the sf array which is up here so you can see we have sad face and then we have all these we just take each one of these and we put them see if I could do this manually like that and because we're doing this that means the whole row will be taken care of with this one command and then this is the next row there's an extra row and we do that eight times to take care of the whole screen now by default they should be off so if you want to set any on you have to do this but if you're not going to touch a row you don't have to actually input anything let's put that back to what it was and let's upload this and see if it works look at that so we have our sad face as I went over before it's off off four ons and then off off that's because of what we did up here they actually all have that which I guess you would call like the forehead or the top of the head part and then you can see the next row it does off on middle off and then on off I think it'd be cool that we can actually make our own face or whatever you want to call it I think something that would be simple is the letter H so I'm just going to do that so first thing I'm going to do is comment out sad face and refresh and have it clear the display because this thing is really bright comment this out because it's breaking the code oh I commented out the whole loop there we go that should work so we'll do an array called letter H it's a byte array with eight pieces inside of it and then I'm going to go and we're going to need to shut off a bunch of rows so let's do one two three four five six seven eight all right and then one thing I should say one thing I should note is for the letter H should probably be easier for us to work in columns because we have those two big parts of the H and then the one in the middle so we can work with columns for the two sides and then the middle one can be a row so we're only actually going to need three pieces for the letter H which will make our lives very easy so I'm going to uncomment those so let's do the first the columns so we want column zero and column seven or also known as the first column and the last column so zero and then seven we want those to be lit up so what we'll do is we'll grab the pieces of our array the first two will be full on so we need one two three four five six seven eight we need that twice the rest of these don't matter because we're only going to use three of them so I mean you could if you want to you could shorten it like this and then you could do that so the first column zero zero is going to be turned on the second or the sorry the last column the seventh column is going to be on as well that's going to be the first part the second part we don't even need these to be honest just because they're all three the same we could just copy paste that but it doesn't matter and then we're going to do one two three four five let's do the fifth row the fifth row to be on all right let's upload that and see what we get something broke what broke well apparently it's not set cool it's set column so let's try that and see what happens boom there's our h also I made this one a little little mistake here that should look more like an h right there check that out we made our own letter that's it for that led matrix if there's anything you want to know about it see about it any of the code you have questions you want to make other letters you can do two things you can like the video subscribe to the channel and then check out the discord link in the bio of this video where you can come and join and ask me questions personally or anyone else who's in that group thanks for watching