 This video is part of a series, be sure to check out the last video where we went over the basic setup of the hardware and went over some examples and also how to install the library for this. Now, after you have the library installed inside the Arduino interface, we go up to file examples. I can go down here to IMG2TV and we'll open up the basic demo. Now, I'm going to open up the NTSC because I live in the US. If you live in another country, you might be a PAL formatting, so just figure out what it is for your country. You probably already know. Go ahead, open up that demo. Now this is the demo that showed a logo coming down and then displayed some text, showed another image, some more text, did a couple of shapes and then loaded up a 3D cube that it made. So, this is, we load up the libraries up here and then we have the rest of the code here. For everything that it does, but you'll see here in a particular place, it will load up like here it says TV bitmap and then it says 00 and then schematic, so that's schematic and then we do the same here under intro, if we go down to the intro function, it gets some measurements here. Basically, this is aligning stuff on the screen, a lot of this numbers and stuff here, but you'll see again TV.bitmap and then here it's putting in some math and then it's going to load up the logo and there's a few other functions here, but again to go back to the simple part of that, that one it says TV logo and you'll notice that we have TV logo.h here and TV logo.cpp and same for schematic, we have schematic h and schematic cpp and that's loaded up here, the schematic h and the TV logo. And so one of them is just kind of creating the variables and then the other one is actually assigning an array here of hex code for each pixel in an image, but you can also pass it straight binary bits, so we can do ones and zeros. So to keep things a little more simple, instead of looking at the hex code, I'm going to open up my example, so I'm going to go up to examples IMG to TV and I'll go here to NTSC underscore IMG, which is the example code I made and again we have where we load the bitmap here. Now the first two numbers, 00, that is where it aligns, that's the top left of the image, so 00 means we're aligning it the top left of the screen. If you want to move it over or down, you would adjust those numbers accordingly, but here we're loading up a variable, which is an array of the bitmap that's labeled image and if we go over here to image cpp, you can see that I've put in all these ones and zeros here. Now I generated this with a code, a bash script code that I wrote that I'll go over in a future tutorial and I actually took a PNG image of tux and generated this output, but today what we're going to do before we get into that just to help you understand a little bit better. I'm going to erase all these ones and zeros and I'm going to manually create a very simple image. So I'm going to delete all those zeros, you notice it starts off as 0B. So I'm going to remove all that. The first little part of this is the resolution, now remember our max resolution with this project is 128 by 96. So let's make something a little bit simpler, we're going to do an 8 by 8 image. So now I can say 0B, 0, 0, 0, 0, 0, 0, 0, comma. So that's one row of pixels, we're doing 8 by 8. So each one of these zeros is either going to be a white mark or a black mark. So let's go ahead and I'm going to copy this and paste it 4, 5, 6, 7, 8 times and I don't think we want the comma on the last one, yeah, no we don't. So right here, everything's one color but let's go ahead and change 1, 2, 3, 4, 5, 6, 7, 8. 1, 2, 3, 4, 5, 6, 7, 8, I don't know why I copied and pasted it like I did if I was going to change this but 1, 2, 3, 4, 5, 6, 7, 8 comma and we'll do the last one, 1, 2, 3, 4, 5, 6, 7, 8. So here we've created, we're going to have a black and white lines alternating. So now that I did that, I can go ahead and compile and upload that to my board and I'll go ahead and get my camera and we can see what that looks like. So there you go, you can see we have lines on the top of the screen, same image, those are lines going down and then we'll have a little bit of text that's in the script and then there's the image with lines kind of centered, almost centered on the screen. Okay, so it's very basic and straightforward. And so now let's create another image. So I'm going to go back and I'm going to change all these to zeros again and now I'm going to take a row here and I'm going to go 0, 1, 1, 1, 1, 0 and then I'll go 1 here, 1 here and basically I'm drawing a picture, a picture, 1 pixel at a time. Not perfect, I just kind of made a circle there, I'm going to add a little 1 there and a 1 there and I kind of made a circle with 2 dots, kind of like a smiley face. So I'm going to go ahead and compile and run that, let's have a look at that. So there we go, I know it's at the clearest in the camera and we got a circle with 2 dots, it's almost like a smiley face without the smile. Okay, let's adjust that again, let's clear these back out to be all zeros. So it's all black now, what I'm going to do is I'm going to do my best to create a Pac-Man type character. Sorry if this is a little boring watching me do this and zero there, okay. So I did that but only am I going to do that but what I'm going to do here is I'm going to set this to a 1 second delay, so 1,000 milliseconds and I'm going to copy and paste this line a few times and what I'm going to do is I'm going to move this over 10, 20, 30, 40, oops. So basically what I'm going to be doing here is I'm going to every second draw a new Pac-Man character to the screen slightly over and slightly down, so basically make a diagonal line of Pac-Man. Let's go ahead and pile and upload that and see how that looks. There we go now. I kind of messed up, he isn't really round down in the corner but you get the idea and then here he's Pac-Man again with the little line being drawn. Let me reset so you can see that again. So little Pac-Man characters being thoroughly drawn on the screen I might say. So you're getting the idea, hopefully, now you might ask well what happens if I want it to be bigger than 8 by 8? Well that's simple. You can, these don't have to be written like this, you can have this up here or you can have the image go down but you always have to have after every 8 bits, I'm sorry, after every 8 bytes, you have to have 0B to indicate a new bit and basically you would do the same thing except for you would change the resolution here. If I was to put this as like 16 by 8, which one works, I don't have enough, so I can do like 4 by 8, it would change the way these pixels would line up. Now in the next tutorial I'm going to show you again a script I have that can take images that are bitmats or PNGs or really any format I've been using PNGs but I'll talk about that more in the next video where you can actually create an image again. Next resolution of 96 by 128, they have to be divisible by 8, otherwise it gets wonky, the picture won't line up properly but that's it. I'm hoping you get the concept of this, again it's not gray scale, it's black and white, it's one bit color so you have one bit that can be either on or off for each pixel if you will, that we're drawing and again I hope that this helped you understand a little bit more, I'm trying to keep it as basic as possible and again in the next video I'm going to show you how to do this very easily with slightly more detailed images, you're still very limited because of it being one bit color and low resolution but I thank you for watching, please visit my website FilmsByChris.com, there's Chris with a K, there should be a link in the description, if you like this video be sure to like it, comment, let me know, share and subscribe that helps a lot, especially if you want to keep up to date on the videos I'm doing and see the rest in this series be sure to subscribe and if you like my videos as a total be sure to support me on Patreon, patreon.com, forward slash mail X1000, there's a link in the description of this video and of course I have my other channel which is more software based, I know we're doing a lot of software here but this is software being compiled for hardware so I think it should belong in this channel, thanks for watching and as always I hope that you have a great day.