def demo(pi, address): yield from pi.connect(address) lcd_screen = LcdScreen(pi, LCD_E, LCD_RS, LCD_D4, LCD_D5, LCD_D6, LCD_D7) yield from lcd_screen.init() while True: yield from asyncio.sleep(1) yield from write_diag(lcd_screen) yield from asyncio.sleep(1) yield from lcd_screen.clear() yield from asyncio.sleep(1) yield from write_move_home(lcd_screen) yield from asyncio.sleep(1) yield from lcd_screen.clear() yield from asyncio.sleep(1) yield from write_at(lcd_screen) yield from asyncio.sleep(1) yield from lcd_screen.clear() yield from asyncio.sleep(1)
def demo(pi, address): yield from pi.connect(address) lcd_screen = LcdScreen(pi, LCD_E, LCD_RS, LCD_D4, LCD_D5, LCD_D6, LCD_D7) yield from lcd_screen.init() yield from create_custom_char(lcd_screen) while True: yield from write_custom_char(lcd_screen) yield from asyncio.sleep(5) yield from lcd_screen.clear() yield from lcd_screen.enable(False) yield from asyncio.sleep(2) yield from lcd_screen.enable(True)