main.get_main_thread
arduino_stim.main.get_main_thread()Run the main loop in a separate thread.
This function creates and starts a background thread that runs the main arduino stimulator loop. It allows the Arduino controller to be stopped via the returned Event object.
Returns
| Name | Type | Description |
|---|---|---|
| tuple[threading.Thread, threading.Event] | A tuple containing: - threading.Thread: The thread object running the main loop - threading.Event: Event object that can be .set() to stop the main loop |