update code.py to pull from new data source... for real
+"""
+'of this day' demo
+Display notable info about famous electronics-related peoples
+Data sources: https://github.com/adafruit/OTD/tree/master/electronics
+"""
+
import random
import board
import time
@@ -12,13 +18,13 @@ YEAR = ["Year"]
ACCOMPLISH = ["Accomplishment"]
WEB = ["Web Reference"]
-DATA = cwd+"/local.txt"
+DATA = "https://raw.githubusercontent.com/adafruit/OTD/master/electronics/01_01.json"
# create pyportal object w no data source (we'll feed it text later)
pyportal = PyPortal(url = DATA,
json_path = (DAY, PERSON, NOTABLE, YEAR, ACCOMPLISH, WEB),
status_neopixel = board.NEOPIXEL,
- default_bg = none,
+ default_bg = cwd + "/on_this_day_bg.bmp",
text_font = cwd+"fonts/Arial-ItalicMT-17.bdf",
text_position=((10, 70), (10, 100), (10, 130),(60, 160), (105, 190), (10, 220)),
text_color=(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF),
