def oled_locate(row=0,col=0): """ 128~ 192~ """ if row == 0: send(128 + col) elif row == 1: send(192 + col) def send_str(_str): for s in _str: d = STR_TABLE.get(s,0) if d: send(d,True) if __name__ == "__main__": GPIO.setwainings(False) gpio_init() oled_init() send_str("WinStar OLED") oled_locate(1, 0) send_str("Display!") GPIO.cleanup()