Exemple #1
0
    return None


displayio.release_displays()
# oled_reset = board.D9

# Use for I2C
i2c = board.I2C()
display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)

# SH1107 is vertically oriented 64x128
WIDTH = 128
HEIGHT = 64

display = adafruit_displayio_sh1107.SH1107(display_bus,
                                           width=WIDTH,
                                           height=HEIGHT,
                                           rotation=180)
display.auto_refresh = False

font = bitmap_font.load_font("/digit-16px.pcf")
text_area = label.Label(font, text=" ", line_spacing=0.95)
text_area.y = 8
display.show(text_area)

N = float

unary = {
    K_SQ: lambda a: a**.5,
}

binary = {
Exemple #2
0
# Set update rate to once a second (1hz) which is what you typically want.
gps.send_command(b"PMTK220,1000")
# Or decrease to once every two seconds by doubling the millisecond value.
# Be sure to also increase your UART timeout above!
# gps.send_command(b'PMTK220,2000')
# You can also speed up the rate, but don't go too fast or else you can lose
# data during parsing.  This would be twice a second (2hz, 500ms delay):
# gps.send_command(b'PMTK220,500')

displayio.release_displays()

adt = adafruit_adt7410.ADT7410(i2c, address=0x48)
adt.high_resolution = True

display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)
display = adafruit_displayio_sh1107.SH1107(display_bus, width=128, height=64)

#Create Lines of text
splash = displayio.Group()
line1 = label.Label(terminalio.FONT, text="                ",
    color=0xFFFF00, x=2, y=3)
line2 = label.Label(terminalio.FONT, text="                ",
    color=0xFFFF00, x=2, y=13)
line3 = label.Label(terminalio.FONT, text="                ",
    color=0xFFFF00, x=2, y=23)

splash.append(line1)
splash.append(line2)
splash.append(line3)

display.show(splash)