poulet_py.hardware.stimulator.arduino module#
- class Arduino(ports=None)[source]#
Bases:
object- __init__(ports=None)[source]#
Initialize the Arduino class with the given ports.
- Args:
ports (list): List of serial port addresses.
- read_data(data_parser=<class 'float'>)[source]#
Read data from the Arduino and parse it.
- Args:
- data_parser (callable): Function to parse the data read from the Arduino.
Defaults to float.
- Sets:
self.parsed_data: Parsed data from Arduino.
- set_error_log_path(folder_path, error_file_name)[source]#
Set the error log path for the Arduino.
- Args:
folder_path (str): Path to the folder where the error log will be stored. error_file_name (str): Name of the error log file.
- set_output_file(path, extra_name, data_columns=['data'], base_file_name='arduino')[source]#
Set the output file for the Arduino.
- Args:
path (str): Path to the folder where the output file will be saved. extra_name (str): An additional name to be added to the base file name. base_file_name (str): Base name of the output file. Defaults to ‘arduino’.