small prettifying.
This commit is contained in:
8
main.py
8
main.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user