Updated entry point
This commit is contained in:
27
rpi/main.py
27
rpi/main.py
@@ -1,14 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from board_mate_client import ApiClient, Configuration
|
||||
from controllers.board_mate_controller import ApiController
|
||||
from models.clock import Clock
|
||||
from scripts.timer.grove_rgb_lcd import setRGB, setText
|
||||
import threading
|
||||
import queue
|
||||
import time
|
||||
from hardware.screen.screen import Screen
|
||||
from hardware.rfid.reader import RfidReader
|
||||
from services.mqtt_service import MQTTService
|
||||
|
||||
def publish(uid : int) :
|
||||
screen = Screen()
|
||||
screen.displayMessage(str(uid))
|
||||
service.publish("app", "game/start", str(uid), 0)
|
||||
|
||||
if __name__ == "__main__":
|
||||
service = MQTTService("127.0.0.1", 1883)
|
||||
reader = RfidReader("/dev/serial0", 9600)
|
||||
reader.subscribe(publish)
|
||||
reader.start()
|
||||
|
||||
"""
|
||||
def get_move(prompt, move_queue):
|
||||
while True:
|
||||
move = input(prompt)
|
||||
@@ -16,9 +23,7 @@ def get_move(prompt, move_queue):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
config = Configuration(
|
||||
host="http://192.168.15.120:8000"
|
||||
)
|
||||
config = Configuration(host="http://192.168.15.120:8000")
|
||||
setRGB(255, 255, 255)
|
||||
controller = ApiController(config)
|
||||
|
||||
@@ -64,4 +69,4 @@ if __name__ == "__main__":
|
||||
except queue.Empty:
|
||||
pass
|
||||
|
||||
time.sleep(1)
|
||||
time.sleep(1)"""
|
||||
|
||||
Reference in New Issue
Block a user