Data Sheet
1.5inch OLED Module User Manual
It defines two macros in DEV_Config.h: USE_SPI_4W and USE_IIC. If use I2C interface, you
need to set USE_IIC as 1 and USE_SPI_4W as 0; Otherwise, set USE_IIC as 0 and USE_SPI_4W as 1.
Configure RAM:
Three macros are used to configure the control type, they are separately set for use internal
RAM of MCU, use external RAM and use the RAM of OLED:
#define USE_INT_RAM 1
#define USE_EXT_RAM 0
#define USE_OLED_RAM 0
The sizes of internal RAM are different among different Arduino board:
The sample code we provided is based on UNO, so the OLED_BUFSIZ is only 64*16 bytes,
about 1K. However, if you want to full display, it requires about 8K OLED_BUFSIZ.
If use external RAM, you just need to set USE_EXT_RAM as 1 and others as 0.
The OLED RAM is unavailable for this module. Because that when the OLED use serial
communication, data on its buffer cannot be read. It is defined here to compatible with other
OLED.
4. Expected result
Download the code and reset board, relative information are printed via UART interface,
and the OLED will display figures for 2s after a full refresh. Then display bitmap, 16-bits grayscale
and finally display time.
RAPSBERRY PI
1. Hardware Connection
1.5inch OLED
Raspberry Pi
VCC
3.3V/5V
GND
GND
DIN
MOSI
CLK
SCK
CS
CE0
DC
24 (BCM)