main.main
arduino_stim.main.main(stop_event=threading.Event(), logger_level=10)The Arduino stimulator main loop.
Watches an input LSL stream, processes the data, and sends a signal to the Arduino over a serial connection, as well as the arduino_cmd LSL outlet. The stream to watch, buffer size, grace period, Arduino port and the Arduino baudrate are defined in the configuration file.
The loop runs until stop_event is set.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| stop_event | threading.Event | Event used to terminate the loop from another thread. If not provided, a new one is created. | threading.Event() |
| logger_level | int | Logging level passed to the module logger (e.g., 10=DEBUG, 20=INFO). Default is 10. | 10 |
Returns
| Name | Type | Description |
|---|---|---|
| None |
Notes
- Configuration is loaded from
./configs/arduino_stim_sim_config.toml.