diff --git a/micropython_firmware/remote_control.py b/micropython_firmware/remote_control.py index ccfe3a8..cab279a 100644 --- a/micropython_firmware/remote_control.py +++ b/micropython_firmware/remote_control.py @@ -1,11 +1,15 @@ import socket import pygame -rc_socket = socket.socket() -rc_socket.connect(('192.168.4.1', 1234)) # connect to robot - pygame.init() -pygame.display.set_mode() +pygame.display.set_mode((640, 480)) + +rc_socket = socket.socket() +try: + rc_socket.connect(('192.168.4.1', 1234)) # connect to robot +except socket.error: + print("could not connect to socket") + while True: events = pygame.event.get()