feat: add logo and customization

This commit is contained in:
2024-05-19 22:00:51 +02:00
parent b277a0357d
commit 81851d21f8
11 changed files with 151 additions and 14 deletions

BIN
src/images/logo.bin Normal file

Binary file not shown.

BIN
src/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

View File

@@ -34,13 +34,13 @@ def draw_about():
# logo
image = bytearray(int(32 * 32 / 8))
open("images/{}".format("census.bin"), "r").readinto(image)
open("images/{}".format("logo.bin"), "r").readinto(image)
display.image(image, 32, 32, 86, 56)
pprint(display, "Engineering", 125, 56, 0)
pprint(display, "Offsite", 125, 66, 0)
pprint(display, "Brooklyn", 125, 76, 0)
pprint(display, "2022", 125, 86, 0)
pprint(display, "AWS Summit", 125, 56, 0)
pprint(display, "---", 125, 66, 0)
pprint(display, "Milan (Italy)", 125, 76, 0)
pprint(display, "2024", 125, 86, 0)
def render():
display.pen(15)

View File

@@ -1,8 +1,7 @@
https://getcensus.com/
Census
* the leading reverse ETL
* no more CSV files
* sync data in real-time
https://marianosciacco.it/publications/qrfuzz-paper/
Mariano Sciacco
* IoT & Cloud Engineer
* Vimar S.p.A.
* (AWS Summit 2024)
Scan this code to learn
more about Census.
If Youre Scanning This, Its Too Late!

View File

@@ -226,10 +226,10 @@ def draw_border(display):
display.line(1, 1, 1, 127)
display.line(1, 127, 295, 127)
display.line(295, 1, 295, 127)
display.image(bytearray((0xff, 0xff, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0)), 8, 8, 0, 0)
display.image(bytearray((0xff, 0xff, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0)), 2, 2, 0, 0)
display.image(bytearray((0xff, 0xff, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x03)), 8, 8, 288, 0)
display.image(bytearray((0x03, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0xff, 0xff)), 8, 8, 288, 120)
display.image(bytearray((0xc0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xff, 0xff)), 8, 8, 0, 120)
display.image(bytearray((0xc0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xff, 0xff)), 2, 2, 0, 120)
def map_value(input, in_min, in_max, out_min, out_max):
return (((input - in_min) * (out_max - out_min)) / (in_max - in_min)) + out_min