Data Sheet

1.5inch OLED Module User Manual
unsigned short h;
}HEADGRAY;
It is totally 6 bytes:
The first byte defines the scanning way:
Bit7: 0: from left to right; 1: from right to left
Bit6: 0: from top to bottom; 1: from bottom to top
Bit5: 0: the pixels in the byte are ordered by DESC; 1: the pixels in the byte are ordered by
ASC
Bit4: 0: The byte order of WORD type is same as PC; 1: The byte order of WORD type is
contrary to PC
Bit3-2: Reserved
Bit1-0: [00]: Horizontal Scanning; [01]: Vertical Scanning; [10]: Data horizontal and Bytes
Vertical; [11]: Data vertical and Bytes horizontal
The second byte is the value of gray level:
1: monochrome
2: 4-bits grayscale
4: 16-bits grayscale
8: 256 color
12: 4096 color
16: 16-bits multicolor
24: 24-bits multicolor
32: 32-bits multicolor
And the rest is the width and height of the image.
For example:
The header we used on the sample code is that:
We could get the information: Scanning from left to right, 16-bits grayscale. The width and
height of image are 128 and 54 separatelly.