forked from CMPS3152-SemesterProject/mbot-wall-avoider
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup.py
More file actions
25 lines (19 loc) · 678 Bytes
/
startup.py
File metadata and controls
25 lines (19 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import multiprocessing
import BluetoothConnector
Bluetooth = True
DeviceId = "00:1B:10:FB:FD:6C"
def startup():
import main as program
"""
This function is called when the robot first starts up.
It is intended to be used for any setup or initialization
that needs to be done before the main loop begins.
"""
print("\033[94mStarting up.\033[0m") # Print in blue and reset color
program.entry_point()
if __name__ == "__main__":
# Start the connection to the BLE bridge
if Bluetooth is True:
multiprocessing.set_start_method("spawn", force=True)
BluetoothConnector.connect_bridge(device_id=DeviceId)
startup()