Datasheet

15
grayH= 0xF0
grayL= 0x0F
def sendCommand(byte):
Oled.write8(Command_Mode,byte)
def sendData(byte):
Oled.write8(Data_mode,byte)
def multi_comm(commands):
for c in commands:
sendCommand(c)
def oled_clearDisplay():
for j in range (0,48):
for i in range (0,96):
sendData(0x00)
def oled_setNormalDisplay():
sendCommand(Normal_Display_Cmd)
def oled_setVerticalMode():
sendCommand(0xA0) # remap to
sendCommand(0x46) # Vertical mode
def oled_setTextXY(Row,Column):
sendCommand(0x15) # Set Column Address
sendCommand(0x08+(Column*4)) # Start Column: Start from 8
sendCommand(0x37) # End Column
# Row Address
sendCommand(0x75) # Set Row Address
sendCommand(0x00+(Row*8)) # Start Row
sendCommand(0x07+(Row*8)) # End Row
def oled_putChar(C):
C_add=ord(C)
if C_add<32 or C_add>127: # Ignore non-printable ASCII characters
C=' '
C_add=ord(C)
for i in range(0,8,2):
for j in range(0,8):
c=0x00
bit1=((BasicFont[C_add-32][i])>>j)&0x01