 So in this video I'm going to show you how to use this simple OLED display and write some simple code to use it. If you enjoy this type of content give the video a like and subscribe to the channel so that you can see more content like this. If there's anything I haven't reviewed yet that you want to see let me know in the comments. When it comes to displaying information these OLEDs have been the go to for many people including myself. They're extremely cheap, they work on low power and they're very nice and small but they have a really high resolution. This one right here is 0.96 inches from quarter to corner but it has a resolution of 128 times 64. It might not seem like a lot but when you're displaying a 240p video on your computer it's stretched usually to like 13 inches. Now imagine if you had that resolution at something like this size. It looks a lot clearer because the pixels are a lot smaller and a lot more squished in. When it comes to options of sizes there's really not many. There's the 0.961 that we have here, there's a 0.91 that's a more rectangle and then there's a 1.5 that's really expensive and not much bigger than the one I'm holding in my hands. I think this has something to do with most of these displays being used in cheap electronics like vape pens. They don't really need large displays so they don't really make them for any other reason and I'm pretty sure this is the same one that they use in vape pens. They're just like reapplying it to a board and then now you have a little educational tool or a screen for your project. I'm pretty sure they come from the same manufacturer. The nice thing about these is they're extremely simple when it comes to the code and the build. There's the display sandwiched on top of a board with four pins at the top and that's it. You even got four holes to bolt to whatever you want like for example this is one I used back in the day where we 3D printed a case for it. The four pins at the top have four different labels that there's no way you'll see on camera so I'll put a picture up on the screen. You have VCC which goes to your five volt port on your board. Your GND which is ground it goes to the ground port. You have SLA and SDA which go to those respective pins on whatever board you're using. I'm using an Arduino Uno which has two dedicated pins SEL and SDA and I think if you don't have SEL and SDA pins you can also do I think it's A4 and A5. I have to check that but whatever board you're using just look up their pinout and see which ones have SDA and SEL written next to them and plug it into those. Also if your OLED display like this one has more than four pins you may have another model I think it's the SPI model I'm going to put a picture up on the screen just use the pinout for that one once you have it all plugged in let's go to the editor and start with the code. So with these type of OLED boards we can actually use libraries of pre-written code to make our lives even easier and Adafruit has done that for us. So I'm just going to go over here to the library manager and in there I'm going to search a couple different libraries. The first one we need is SSD1306. We're looking for the one made by Adafruit so that's this one right here and we're going to install that and then you need to install these two GFX library and bus IO. If you do have this option come up just install all but if not just go and search those up and install them individually. So here's an example on how to draw a pixel. That's it just a one dot on the screen you have to include your libraries you have to create your display with a couple different details like the height and width you have to check if it's connected open up your serial monitor at this rate and then down here we start with the really basic code to put a dot we do this before we start the program we have to declare the display so we're starting with a blank page and then we're going to add one pixel at 1010 on the screen so 10 to the left and 10 down and we're going to make it a white pixel not all of these have color mine does but I'm going to make it white then anytime you make changes nothing will happen to the screen until you do display dot display again so I can add one pixel here I can add another pixel at 1515 doesn't matter but it will not happen to the screen until you do display dot display so if you were to if you were to do this and then delete the bottom one your screen will only show this one the one at 1010 and it will never show this one because you never do display dot display again you would have to throw that at the end again and think of it as like a closing argument you want to make a change you want to put something on screen you have to close that argument with display dot display so let's upload that code and I'm going to move it next to the camera so you guys could see exactly what I'm talking about if I could even focus it there's your two absolute tiny dots we drew some pixels that's cool but let's get let's get into something a little bit more complicated so we did pixels now let's do this script what I changed was I added a double loop for drawing a pixel every time it loops it's going to be drawing a new pixel in a new location I'm going to put the delay a bit lower just for the sake of the video but you can play with that as long as you want so it's going to put a pixel in 00 then it's going to a loop again and it's going to put a pixel in 01 and it's going to keep going keep going until it hit 64 on this row and then it's going to go into two and then it's going to go into three into four into five so it's going to print top to bottom over and over and over going from left to right of the screen there we go you can see our little line there and it's just printing one next to another and it's going to keep going oh a little bit of a glitch I'm sure it's really hard to see on camera but the line is slowly thickening all right so we drew a pixel we animated a line let's move on to text for text you have to follow a couple different steps first you have to choose a text size then your text color then your cursor so that's what pixel you're starting to write on so if you were to do 00 it's going to start in the top left corner of the OLED display and then you have to write your text so we're going to do hello world the typical programmer sentence going to upload that to the board and then once again just wait for it to update boom there you go hello world you can see it's small but if we up that text size from one to whatever number you'd like it's going to get a lot bigger and start to run off screen all right so we did pixel we did animated pixels we did text let's go and finish this off with two different things first we're going to do a shape so we'll just go and grab a rectangle when it comes to drawing shapes like a rectangle it's actually a lot simpler than you think you're really placing a bunch of pixels together to make a line and then you're doing that in four different directions to make the rectangle i have a function here i put up on the screen it's going to make us a rectangle at every single size starting by the the biggest that can fit and then going down to the smallest that can fit so i'll just bring it up to the camera here starts with the biggest rectangle and then goes down to the smallest one available it then stops when no more can fit as you can barely tell that's enough to fit one row of pixels which will not make a rectangle now let's do what everyone clicked on this video for to put a picture up on this OLED display to do that we're going to need to use this piece of code that i'm going to link in the description so copy and paste it over to your project and then follow the steps with me the first step you're going to have to follow is find a picture that you want to put on this OLED display then take that picture to the website that i linked in the description and turn it from a picture to a big piece of code what that piece of code is going to look like is something like this i'm just going to copy paste the old one and put mine over it this is every single pixel in the display and what color it should be and if you scroll around you can see that some of them change color to white some of them change color to black once you do that you can call this picture over into your display and actually print it out so i'm going to go down here and use the display dot bitmap zero zero picture width and height and then white i'm going to just click over on the upload button and check that out all right well that's it for the OLED display for the Arduino if you have any questions any comments anything you want to know something i screwed up let me know in the comments and i'll answer them right away