1
00:00:01,170 --> 00:00:08,130
In this lecture hall show you how to use one of these tiny OLED graphics displays, which is based on

2
00:00:08,130 --> 00:00:11,840
the essayistic one three zero six controller chip.

3
00:00:12,450 --> 00:00:15,210
So this is an ice Quixey device.

4
00:00:15,780 --> 00:00:21,020
It was able to print text and arbitrary graphics there.

5
00:00:21,030 --> 00:00:27,990
Library that I'm going to use and can show you provides access to functions that allow you to print

6
00:00:27,990 --> 00:00:31,280
primitives such as lines and boxes and circles.

7
00:00:31,860 --> 00:00:36,540
And it is connected to the E.S.P 32 via the software.

8
00:00:36,570 --> 00:00:38,340
It's Quazi module.

9
00:00:38,670 --> 00:00:44,930
I did try to get it to work with the hardware I took, which module, but it didn't quite work.

10
00:00:45,180 --> 00:00:49,920
So there is an issue there most likely has to do with the library that I'm using.

11
00:00:50,310 --> 00:00:54,240
I did try to find one that would support hardware.

12
00:00:54,240 --> 00:00:56,440
I could see but to do so.

13
00:00:56,440 --> 00:01:00,960
So if I do, I will update this lecture with a new updated library.

14
00:01:01,590 --> 00:01:05,370
So in terms of the wiring, things are pretty simple.

15
00:01:05,700 --> 00:01:08,090
I just provide power through.

16
00:01:08,130 --> 00:01:12,070
This is just going to unplug it to show you what's underneath, actually.

17
00:01:12,540 --> 00:01:13,030
All right.

18
00:01:13,040 --> 00:01:20,670
So there's VXI, which goes to the three point three volt pin, which is this one right here.

19
00:01:21,000 --> 00:01:28,470
And the module got a tiny jumper wire that connects this pin to the red power real.

20
00:01:28,950 --> 00:01:36,390
Then ground goes to the ground up in here again, I've got jumper wire to connect this pin to the blue

21
00:01:36,900 --> 00:01:38,720
ground radio.

22
00:01:39,450 --> 00:01:44,310
And then there's the ACL and SDK.

23
00:01:44,610 --> 00:01:52,650
And I have connected those to those twenty six for FDA and twenty five for FCL.

24
00:01:52,960 --> 00:01:59,520
I've got that information listed here in the header of the example script.

25
00:02:00,920 --> 00:02:06,440
One thing I want to note here about these displays, not just this particular one, but the one that

26
00:02:06,440 --> 00:02:12,950
I'll show you in the next lecture, is that there there are no markings on the displays themselves about

27
00:02:12,950 --> 00:02:16,010
which type of controller they are using.

28
00:02:16,580 --> 00:02:24,920
So what I do as a habit these days is to print a label and stick the label on the PCAOB, on the back

29
00:02:24,920 --> 00:02:30,920
of the BCB with a model of the controller integrated circuit, because without it, it's going to be

30
00:02:30,920 --> 00:02:36,420
nearly impossible to at least quickly find the driver that matches your display.

31
00:02:36,440 --> 00:02:42,590
You'd have to go with a lot of trial and error, or you'd have to somehow find the original documentation

32
00:02:42,950 --> 00:02:44,620
of the purchase of the module.

33
00:02:45,570 --> 00:02:52,130
Just a tip to save you a lot of time whenever you buy a display like this with no information on it

34
00:02:52,130 --> 00:02:58,040
printed about the controller integrated circuit, just they they use a Post-it note or printer use something

35
00:02:58,040 --> 00:03:04,950
like this to print out the model number of the controller, and that can save you a lot of time later

36
00:03:05,000 --> 00:03:10,310
on, I'm going to plug the display back onto my breadboard.

37
00:03:12,650 --> 00:03:22,250
All right, and let's have a look at the software side, so the script that I'm using, it's very simple.

38
00:03:22,260 --> 00:03:30,650
It just all it's really here is to print out a bit of text and some primitives, like fill the screen

39
00:03:30,650 --> 00:03:32,860
with a turn on all the pixels.

40
00:03:33,110 --> 00:03:41,690
That's what one means, means the pixel is on over and the screen off by writing zeros to all the pixels

41
00:03:42,820 --> 00:03:47,980
of a line and then a bit of text back to the beginning by cleaning it up.

42
00:03:48,530 --> 00:03:59,540
So the whole thing is based on this library is a very simple script that are found that act as a driver

43
00:03:59,540 --> 00:04:02,380
for the screen, just like other displays drivers.

44
00:04:02,790 --> 00:04:11,600
It is based on the frame buffer module that is part of the micro python implementation for the DP 32

45
00:04:11,600 --> 00:04:13,130
and of course, are the microcontrollers.

46
00:04:13,460 --> 00:04:14,720
So everything is based on this.

47
00:04:15,500 --> 00:04:21,980
You can refer to the source code of this module to see what kind of functions are available, for example,

48
00:04:21,980 --> 00:04:23,000
initialization.

49
00:04:23,000 --> 00:04:30,320
This power of you can control the contrast and this is when you call this show function in order to

50
00:04:30,410 --> 00:04:35,360
print on the display whatever image is stored in the buffer.

51
00:04:35,690 --> 00:04:44,180
And you can see this pixel feel, scroll, text, horizontal line, vertical line, arbitrary line,

52
00:04:44,300 --> 00:04:44,800
cetera.

53
00:04:45,110 --> 00:04:47,870
These are the primitive graphics that you can use.

54
00:04:48,950 --> 00:04:52,220
So back to my simple script.

55
00:04:52,910 --> 00:04:54,980
I am using this software.

56
00:04:54,980 --> 00:04:56,390
It's Kwesi module.

57
00:04:56,390 --> 00:04:58,100
I destroy the hardware one.

58
00:04:58,100 --> 00:05:05,510
As you can see here, for example, I try to use the the first idea which actually uses twenty five

59
00:05:05,510 --> 00:05:13,700
and twenty six anyway, but the creates the hardware put in work and I get the same pins using soft

60
00:05:13,700 --> 00:05:14,040
ice.

61
00:05:14,060 --> 00:05:15,590
Quixey and it worked.

62
00:05:15,590 --> 00:05:21,770
So for this particular screen I'm going with the software implementation of the ice which the protocol.

63
00:05:22,700 --> 00:05:29,870
And I'm using a couple of variables to store the horizontal and vertical within height number of pixels

64
00:05:29,870 --> 00:05:36,230
for this particular screen is 128 by 64 and I'll use the as is the one three zero six.

65
00:05:36,230 --> 00:05:42,530
I could see constructor passing those parameters across and get my or ality object.

66
00:05:42,740 --> 00:05:50,420
And from then onwards, I can use the primitives that you can see here in the source code of the screen

67
00:05:50,420 --> 00:05:59,630
driver to do things such as write text in a particular location or fill the screen with particular colors

68
00:05:59,630 --> 00:06:05,480
or draw a line or pixels or any other kind of graphics based on those primitives that you want.

69
00:06:05,960 --> 00:06:11,810
And then you will just do that again and again and again each time that I'm doing some drawing in the

70
00:06:11,810 --> 00:06:20,210
buffer in order to make that drawing visible onto the screen, I need to call the show function.

71
00:06:20,540 --> 00:06:26,570
So whenever you call one of those drawing primitives, the drawing actually happens in the buffer,

72
00:06:26,640 --> 00:06:27,950
not on the screen itself.

73
00:06:28,280 --> 00:06:34,040
And it's only when you call the show function that the screen is updated with whatever it is stored

74
00:06:34,040 --> 00:06:34,850
in the buffer.

75
00:06:35,900 --> 00:06:36,400
All right.

76
00:06:36,410 --> 00:06:39,950
So I'm going to hit control.

77
00:06:39,950 --> 00:06:46,340
See, cancel the script was not working because I removed the screen a bit earlier this year.

78
00:06:46,340 --> 00:06:47,090
You what's underneath?

79
00:06:47,540 --> 00:06:53,600
So let's run the script again to make sure that it still works that way, wouldn't it?

80
00:06:53,610 --> 00:07:02,060
But just to finish up with the screen actually working where you can cut the line of text file screens

81
00:07:02,720 --> 00:07:03,980
and back to the beginning.

82
00:07:05,580 --> 00:07:07,150
OK, so that was quite easy.

83
00:07:07,560 --> 00:07:12,600
The next lecture, I'm going to show you how to use this slightly bigger OLED display, which again

84
00:07:12,600 --> 00:07:14,870
is using the same interface.

85
00:07:14,880 --> 00:07:20,390
I see same pin layout just to swap between the two screens.

86
00:07:20,400 --> 00:07:26,280
But this one is using a different controller chip to show you how to make use of this screen.

87
00:07:26,310 --> 00:07:26,610
This will.

88
00:07:27,150 --> 00:07:28,410
This jump over to the next.
