def lcd_init(): lcd = LCD() # Create a LCD object lcd.light(True) # Open the backlight lcd.set_color(lcd.WHITE, lcd.BLACK) # Set background color and foreground color lcd.fill(lcd.WHITE) # Fill the entire LCD with white lcd.text("0000-00-00", 10, 0, 24) lcd.line(0, 25, 239, 25) lcd.text("City: N/A", 10, 105, 24) # prints the string at 32 font size at position (0, 48) lcd.text("Humidity: N/A", 10, 135, 24) lcd.text("Temp: N/A", 10, 165, 24) lcd.show_bmp(45, 87, "pictures/weather.bmp") lcd.show_bmp(5, 238, "pictures/micropython.bmp") lcd.show_bmp(210, 20, "pictures/wifi_week.bmp") return lcd
def main(): lcd = LCD() lcd.light(True) lcd.set_color(lcd.WHITE, lcd.BLACK) lcd.show_bmp(180, 50, "sun.bmp")