small prettifying.

This commit is contained in:
Adam Rabjerg
2021-08-12 00:10:37 +02:00
parent fbbe2373bd
commit d1febf8fb2

View File

@@ -12,7 +12,7 @@ COUNTS = 0
COUNT_ROLLING = []
LOCAL_IP = ""
# Behold my pixelart
LOGO = [[0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0],
[0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0],
[0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,0,0],
@@ -39,10 +39,6 @@ display = ssd1306.SSD1306_I2C(128, 64, i2c)
display.fill(0) # Fill Black
display.show() # show on display
# Offset for the 5 rows of text
# 0, 12, 24, 36, 48
# Function to connect to network, look at my hardcoded credientals.
def do_connect():
@@ -57,11 +53,13 @@ def do_connect():
pass
LOCAL_IP = str(wlan.ifconfig()[0])
# Draws my pretty pixel art
def draw_logo(x_off, y_off):
for row in range(len(LOGO)):
for px in range(len(LOGO[row])):
display.pixel(px+y_off, row+x_off, LOGO[row][px])
# Configure interrupt
def irq_handler(p):
global COUNTS, COUNT_ROLLING