In this lecture hall show you how to use one of these tiny OLED graphics displays, which is based on
the essayistic one three zero six controller chip.
So this is an ice Quixey device.
It was able to print text and arbitrary graphics there.
Library that I'm going to use and can show you provides access to functions that allow you to print
primitives such as lines and boxes and circles.
And it is connected to the E.S.P 32 via the software.
It's Quazi module.
I did try to get it to work with the hardware I took, which module, but it didn't quite work.
So there is an issue there most likely has to do with the library that I'm using.
I did try to find one that would support hardware.
I could see but to do so.
So if I do, I will update this lecture with a new updated library.
So in terms of the wiring, things are pretty simple.
I just provide power through.
This is just going to unplug it to show you what's underneath, actually.
All right.
So there's VXI, which goes to the three point three volt pin, which is this one right here.
And the module got a tiny jumper wire that connects this pin to the red power real.
Then ground goes to the ground up in here again, I've got jumper wire to connect this pin to the blue
ground radio.
And then there's the ACL and SDK.
And I have connected those to those twenty six for FDA and twenty five for FCL.
I've got that information listed here in the header of the example script.
One thing I want to note here about these displays, not just this particular one, but the one that
I'll show you in the next lecture, is that there there are no markings on the displays themselves about
which type of controller they are using.
So what I do as a habit these days is to print a label and stick the label on the PCAOB, on the back
of the BCB with a model of the controller integrated circuit, because without it, it's going to be
nearly impossible to at least quickly find the driver that matches your display.
You'd have to go with a lot of trial and error, or you'd have to somehow find the original documentation
of the purchase of the module.
Just a tip to save you a lot of time whenever you buy a display like this with no information on it
printed about the controller integrated circuit, just they they use a Post-it note or printer use something
like this to print out the model number of the controller, and that can save you a lot of time later
on, I'm going to plug the display back onto my breadboard.
All right, and let's have a look at the software side, so the script that I'm using, it's very simple.
It just all it's really here is to print out a bit of text and some primitives, like fill the screen
with a turn on all the pixels.
That's what one means, means the pixel is on over and the screen off by writing zeros to all the pixels
of a line and then a bit of text back to the beginning by cleaning it up.
So the whole thing is based on this library is a very simple script that are found that act as a driver
for the screen, just like other displays drivers.
It is based on the frame buffer module that is part of the micro python implementation for the DP 32
and of course, are the microcontrollers.
So everything is based on this.
You can refer to the source code of this module to see what kind of functions are available, for example,
initialization.
This power of you can control the contrast and this is when you call this show function in order to
print on the display whatever image is stored in the buffer.
And you can see this pixel feel, scroll, text, horizontal line, vertical line, arbitrary line,
cetera.
These are the primitive graphics that you can use.
So back to my simple script.
I am using this software.
It's Kwesi module.
I destroy the hardware one.
As you can see here, for example, I try to use the the first idea which actually uses twenty five
and twenty six anyway, but the creates the hardware put in work and I get the same pins using soft
ice.
Quixey and it worked.
So for this particular screen I'm going with the software implementation of the ice which the protocol.
And I'm using a couple of variables to store the horizontal and vertical within height number of pixels
for this particular screen is 128 by 64 and I'll use the as is the one three zero six.
I could see constructor passing those parameters across and get my or ality object.
And from then onwards, I can use the primitives that you can see here in the source code of the screen
driver to do things such as write text in a particular location or fill the screen with particular colors
or draw a line or pixels or any other kind of graphics based on those primitives that you want.
And then you will just do that again and again and again each time that I'm doing some drawing in the
buffer in order to make that drawing visible onto the screen, I need to call the show function.
So whenever you call one of those drawing primitives, the drawing actually happens in the buffer,
not on the screen itself.
And it's only when you call the show function that the screen is updated with whatever it is stored
in the buffer.
All right.
So I'm going to hit control.
See, cancel the script was not working because I removed the screen a bit earlier this year.
You what's underneath?
So let's run the script again to make sure that it still works that way, wouldn't it?
But just to finish up with the screen actually working where you can cut the line of text file screens
and back to the beginning.
OK, so that was quite easy.
The next lecture, I'm going to show you how to use this slightly bigger OLED display, which again
is using the same interface.
I see same pin layout just to swap between the two screens.
But this one is using a different controller chip to show you how to make use of this screen.
This will.
This jump over to the next.