Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyley committed Mar 19, 2022
1 parent f47e2e1 commit 5d20b33
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion picoSyncTime.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Pimoroni Pico LiPo (16MB) : 2E8A:1003
# Keybow 2040 : 16D0:08C6

picoPorts = list(list_ports.grep("2E8A:0005"))
picoPorts = list(list_ports.grep("16D0:08C6"))
if not picoPorts:
print("No Raspberry Pi Pico found")
else:
Expand Down
29 changes: 22 additions & 7 deletions word-clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,26 +212,39 @@ def initialise_fonts(self):
"D": self.Character(width=4, rows=[0x07,0x09,0x09,0x09,0x09,0x09,0x07]),
"E": self.Character(width=4, rows=[0x0F,0x01,0x01,0x0F,0x01,0x01,0x0F]),
"F": self.Character(width=4, rows=[0x0F,0x01,0x01,0x0F,0x01,0x01,0x01]),
"G": self.Character(width=4, rows=[0x06,0x09,0x01,0x0D,0x09,0x09,0x06]),
"H": self.Character(width=4, rows=[0x09,0x09,0x09,0x0F,0x09,0x09,0x09]),
"I": self.Character(width=3, rows=[0x07,0x02,0x02,0x02,0x02,0x02,0x07]),
"J": self.Character(width=4, rows=[0x0F,0x08,0x08,0x08,0x09,0x09,0x06]),
"K": self.Character(width=4, rows=[0x09,0x05,0x03,0x01,0x03,0x05,0x09]),
"L": self.Character(width=4, rows=[0x01,0x01,0x01,0x01,0x01,0x01,0x0F]),
"M": self.Character(width=4, rows=[0x00,0x11,0x1B,0x15,0x11,0x11,0x11,0x11]), # 5×7
"N": self.Character(width=4, rows=[0x09,0x09,0x0B,0x0D,0x09,0x09,0x09]),
"O": self.Character(width=4, rows=[0x0F,0x09,0x09,0x09,0x09,0x09,0x0F]),
"O": self.Character(width=4, rows=[0x06,0x09,0x09,0x09,0x09,0x09,0x06]),
"P": self.Character(width=4, rows=[0x07,0x09,0x09,0x07,0x01,0x01,0x01]),
"Q": self.Character(width=5, rows=[0x0E,0x11,0x11,0x11,0x15,0x19,0x0E]),#Q
"R": self.Character(width=4, rows=[0x07,0x09,0x09,0x07,0x03,0x05,0x09]), #R
"S": self.Character(width=4, rows=[0x06,0x09,0x02,0x04,0x08,0x09,0x06]),#S
"T": self.Character(width=5, rows=[0x1F,0x04,0x04,0x04,0x04,0x04,0x04]), # 5×7
"U": self.Character(width=4, rows=[0x09,0x09,0x09,0x09,0x09,0x09,0x06]),
"V": self.Character(width=5, rows=[0x11,0x11,0x11,0x11,0x11,0x0A,0x04]), # 5×7
"W": self.Character(width=5, rows=[0x11,0x11,0x11,0x15,0x15,0x1B,0x11]), # 5×7
"Y": self.Character(width=4, rows=[0x1F,0x04,0x04,0x04,0x04,0x04,0x04]), # 5*7
"Z": self.Character(width=4, rows=[0x0F,0x08,0x04,0x02,0x01,0x0F,0x00]), # 4×7

":": self.Character(width=2, rows=[0x00,0x03,0x03,0x00,0x03,0x03,0x00]), #2×7
" :": self.Character(width=2, rows=[0x00,0x00,0x00,0x00,0x00,0x00,0x00]), # colon width space
"°C": self.Character(width=4, rows=[0x01,0x0C,0x12,0x02,0x02,0x12,0x0C]), # celcuis 5×7
"°F": self.Character(width=4, rows=[0x01,0x1E,0x02,0x1E,0x02,0x02,0x02]), # farenheit
" ": self.Character(width=4, rows=[0x00,0x00,0x00,0x00,0x00,0x00,0x00]), # space
"Y": self.Character(width=4, rows=[0x1F,0x04,0x04,0x04,0x04,0x04,0x04]), # 5*7

".": self.Character(width=1, rows=[0x00,0x00,0x00,0x00,0x00,0x00,0x01]), # 1×7
"-": self.Character(width=2, rows=[0x00,0x00,0x00,0x03,0x00,0x00,0x00]), # 2×7
"M": self.Character(width=4, rows=[0x00,0x11,0x1B,0x15,0x11,0x11,0x11,0x11]), # 5×7

"/": self.Character(width=2, rows=[0x02,0x02,0x02,0x01,0x01,0x01,0x01,0x01]), # 3×7
"°C2": self.Character(width=4, rows=[0x00,0x01,0x0C,0x12,0x02,0x02,0x12,0x0C]), # 5×7
"°F2": self.Character(width=4, rows=[0x00,0x01,0x1E,0x02,0x1E,0x02,0x02,0x02]),
"V": self.Character(width=5, rows=[0x11,0x11,0x11,0x11,0x11,0x0A,0x04]), # 5×7
"W": self.Character(width=5, rows=[0x11,0x11,0x11,0x15,0x15,0x1B,0x11]), # 5×7

}
self.digital_tube = {
"0": [0x0F, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0F],
Expand Down Expand Up @@ -280,7 +293,9 @@ def initialise_fonts(self):

# display.square()

words = ["APE", "BED", "CAN", "DAVE"]
adjectives = ["GOOD", "BAD" , "FAST", "SLOW", "IRON", "FIRE", "CUTE", "VILE"]
nouns = ["BEAR", "DUCK", "FROG", "GOAT", "JOEY", "LAMB", "MOLE", "WOLF"]

display.show_text("DUCC")

# GOOD, BAD, SOGGY, CUTE, SMUG, VILE, NEAT, TIDY, SORE
Expand All @@ -289,7 +304,7 @@ def initialise_fonts(self):
def secs_callback(t):
t = time.time()
display.clear()
display.show_text(words[t % (len(words))]+" ")
display.show_text(adjectives[t % (len(adjectives))]+" ")


scheduler.schedule("clock-second", 1000, secs_callback)
Expand Down

0 comments on commit 5d20b33

Please sign in to comment.