poulet_py.hardware.stimulator.julabo module#
- class JulaboChiller(port=None, baudrate=9600, timeout=1)[source]#
Bases:
objectClass to interact with a Julabo water chiller via serial port.
- __init__(port=None, baudrate=9600, timeout=1)[source]#
Initialize the JulaboChiller with the given serial port configuration.
- Args:
port (str): The serial port (e.g., ‘COM12’). baudrate (int, optional): The baud rate for the serial communication. Default is 9600. timeout (int or float, optional): The read timeout value. Default is 1 second.
- set_timer(start_time)[source]#
Set the timer for the chiller.
- Args:
start_time (float): The start time of the experiment.
- set_error_log_path(path, file_name)[source]#
Sets the path for the error log file.
- Args:
path (str): The directory where the error log file will be saved.
- set_output_file(path, extra_name, base_file_name='julabo_chiller')[source]#
Sets the output file for recording the video.
- Args:
path (str): The directory where the output file will be saved.
- save_temperature(timestamp, temperature)[source]#
Save the temperature to a CSV file.
- Args:
timestamp: The timestamp to be saved. temperature: The temperature to be saved.
- read()[source]#
Read data from the chiller.
- Returns:
str: The response from the chiller, or None if no data is available.
- write(command)[source]#
Write a command to the chiller.
- Args:
command (str): The command to send to the chiller.
- set_temperature(temperature)[source]#
Set the temperature of the chiller.
- Args:
temperature (float): The temperature to set (in Celsius).