|
36 | 36 | "evening","evening","late evening","late evening"]
|
37 | 37 |
|
38 | 38 | # Months of the year
|
39 |
| -months = ["January", "February", "March", "April", |
| 39 | +months = ["January", "January", "February", "March", "April", |
40 | 40 | "May", "June", "July", "August",
|
41 | 41 | "September", "October", "November", "December"]
|
42 | 42 |
|
| 43 | +# Dictionary of tm_mon and month name. |
| 44 | +# note: tm_mon structure in CircuitPython ranges from [1,12] |
| 45 | +months = { |
| 46 | + 1: "January", |
| 47 | + 2: "February", |
| 48 | + 3: "March", |
| 49 | + 4: "April", |
| 50 | + 5: "May", |
| 51 | + 6: "June", |
| 52 | + 7: "July", |
| 53 | + 8: "August", |
| 54 | + 9: "September", |
| 55 | + 10: "October", |
| 56 | + 11: "November", |
| 57 | + 12: "December" |
| 58 | +} |
| 59 | + |
| 60 | + |
43 | 61 | esp32_cs = digitalio.DigitalInOut(board.ESP_CS)
|
44 | 62 | esp32_ready = digitalio.DigitalInOut(board.ESP_BUSY)
|
45 | 63 | esp32_reset = digitalio.DigitalInOut(board.ESP_RESET)
|
|
75 | 93 | font_large.load_glyphs(b'abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890- ')
|
76 | 94 | font_small.load_glyphs(b'abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890- ()')
|
77 | 95 |
|
78 |
| -# Set up label for the day |
| 96 | +# Set up label for the month |
79 | 97 | label_month = label.Label(font_large, color=LABEL_DAY_COLOR, max_glyphs=200)
|
80 |
| -label_month.x = board.DISPLAY.width // 6 |
| 98 | +label_month.x = board.DISPLAY.width // 10 |
81 | 99 | label_month.y = 80
|
82 | 100 | pyportal.splash.append(label_month)
|
83 | 101 |
|
84 | 102 | # Set up label for the time
|
85 | 103 | label_time = label.Label(font_small, color=LABEL_TIME_COLOR, max_glyphs=200)
|
86 |
| -label_time.x = board.DISPLAY.width // 4 |
| 104 | +label_time.x = board.DISPLAY.width // 3 |
87 | 105 | label_time.y = 150
|
88 | 106 | pyportal.splash.append(label_time)
|
89 | 107 |
|
|
0 commit comments