Datasheet
16
bit2=((BasicFont[C_add-32][i+1])>>j)&0x01
if bit1:
c=c|grayH
else:
c=c|0x00
if bit2:
c=c|grayL
else:
c=c|0x00
sendData(c)
def oled_putString(String):
for i in range(len(String)):
oled_putChar(String[i])
if __name__=="__main__":
oled_init()
oled_setNormalDisplay()
oled_setTextXY(0,0)
oled_putString("Hello")
time.sleep(10)
#Oled.write8(Command_Mode,0xFD)
#sendCommand(0xFD)
print 'hello world'
Step3: Save the file by clicking the disk icon with with the .py extension.
Step4: Connect Grove - OLED to Grove I2C socket on BBG.
Step5: Run the code. You'll find that the Grove - OLED outputs "Hello World".