Add main.py
This commit is contained in:
parent
2ce32c426e
commit
23fc0d976a
19
main.py
Normal file
19
main.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
from display.screen import OLEDDisplay
|
||||||
|
from display.font_manager import FontManager
|
||||||
|
import time
|
||||||
|
|
||||||
|
# Import modules
|
||||||
|
from modules import ip_address, hello_world
|
||||||
|
|
||||||
|
def main():
|
||||||
|
oled = OLEDDisplay()
|
||||||
|
font_mgr = FontManager(size=14)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
message = f"{ip_address.get_ip()}\n{hello_world.get_text()}"
|
||||||
|
font_mgr.draw_multiline_text(oled.draw, message, 0, 0, oled.display.width, oled.display.height)
|
||||||
|
oled.show_image()
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in a new issue