### Get and Set PID Parameters Source: https://context7.com/eliasankerhold/blueftc/llms.txt Allows reading and configuring the proportional (P), integral (I), and derivative (D) parameters of the PID controller. Includes examples of getting current parameters, setting new values, verifying updates, and setting individual parameters. ```python # Work with PID parameters try: # Get current PID configuration pid_params = controller.get_mxc_heater_pid_config() p, i, d = pid_params print(f"Current PID parameters: P={p:.4f}, I={i:.4f}, D={d:.4f}") # Set new PID parameters new_p = 0.5 new_i = 0.1 new_d = 0.05 success = controller.set_mxc_heater_pid_config(p=new_p, i=new_i, d=new_d) if success: print(f"PID parameters updated: P={new_p}, I={new_i}, D={new_d}") # Verify the update updated_params = controller.get_mxc_heater_pid_config() print(f"Verified PID: {updated_params}") # Set only specific parameters controller.set_mxc_heater_pid_config(p=0.75) # Only update P except Exception as e: print(f"Error with PID parameters: {e}") ``` -------------------------------- ### Complete Cryostat Monitoring Example (Python) Source: https://context7.com/eliasankerhold/blueftc/llms.txt A comprehensive Python script for monitoring various cryostat system parameters, including temperatures, resistances, mixing chamber temperature, heater status, power, PID mode, setpoint, and PID parameters. It includes error handling and a loop for continuous monitoring with a delay. ```python from blueftc.BlueforsController import BlueFTController from credentials import IP_ADDRESS, PORT_NUMBER, API_KEY, MXC_ID, HEATER_ID import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning import time # Disable SSL warnings requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # Initialize controller controller = BlueFTController( ip=IP_ADDRESS, port=PORT_NUMBER, key=API_KEY, mixing_chamber_channel_id=MXC_ID, mixing_chamber_heater_id=HEATER_ID, debug=False ) # Monitoring loop try: print("Starting cryostat monitoring...") for iteration in range(10): print(f"\n--- Iteration {iteration + 1} ---") # Read temperatures from all active channels active_channels = [1, 2, 5, 6, 8] for ch in active_channels: temp = controller.get_channel_temperature(ch) res = controller.get_channel_resistance(ch) print(f"Ch {ch}: {temp:.6f} K ({res:.2f} Ohm)") # Read mixing chamber specific data mxc_temp = controller.get_mxc_temperature() print(f"MXC temp: {mxc_temp * 1000:.3f} mK") # Check heater status heater_on = controller.get_mxc_heater_status() heater_power = controller.get_mxc_heater_power() pid_mode = controller.get_mxc_heater_mode() print(f"Heater: {'ON' if heater_on else 'OFF'}, " f"Power: {heater_power:.2f} μW, " f"Mode: {'PID' if pid_mode else 'Manual'}") if pid_mode: setpoint = controller.get_mxc_heater_setpoint() pid_params = controller.get_mxc_heater_pid_config() print(f"PID setpoint: {setpoint * 1000:.3f} mK") print(f"PID params: P={pid_params[0]:.4f}, " f"I={pid_params[1]:.4f}, D={pid_params[2]:.4f}") # Wait before next reading time.sleep(10) except KeyboardInterrupt: print("\nMonitoring stopped by user") except Exception as e: print(f"Error during monitoring: {e}") ``` -------------------------------- ### Quick Start - Read Mixing Chamber Temperature Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Initialize a BlueFTController object with Bluefors API credentials and network configuration, then read the mixing chamber temperature in Kelvin. This example demonstrates basic setup including disabling SSL warnings and retrieving temperature data from a cryostat controller. ```python # import from blueftc.BlueforsController import BlueFTController import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # define required configuration API_KEY = '123456789abcdefghijklmnopqrstuvwxyz' IP_ADDRESS = '123.456.789.0' PORT_NUMBER = 12345 MXC_ID = 6 HEATER_ID = 4 # create controller object controller = BlueFTController(ip=IP_ADDRESS, port=PORT_NUMBER, key=API_KEY, mixing_chamber_channel_id=MXC_ID, mixing_chamber_heater_id=HEATER_ID) # read mixing chamber temperature in Kelvin mxc_temp = controller.get_mxc_temperature() ``` -------------------------------- ### Install BlueFTC Package with pip Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Install the BlueFTC package using pip from the package root directory where pyproject.toml is located. This command installs the package with no external dependencies into the current Python virtual environment. ```shell python -m pip install . ``` -------------------------------- ### Set Heater Power Source: https://context7.com/eliasankerhold/blueftc/llms.txt Sets the power output of the MXC heater in microwatts. Includes verification of the set power and an example of a gradual power ramp. Handles potential exceptions during the operation. ```python try: # Set power to 100 microwatts power_uw = 100.0 success = controller.set_mxc_heater_power(power_uw) if success: print(f"Heater power set to {power_uw} μW") # Verify the setting actual_power = controller.get_mxc_heater_power() print(f"Actual heater power: {actual_power:.2f} μW") else: print("Failed to set heater power") # Example: Gradual power ramp for power in [50, 100, 150, 200]: if controller.set_mxc_heater_power(power): current_power = controller.get_mxc_heater_power() print(f"Ramped to {current_power:.2f} μW") except Exception as e: print(f"Error setting heater power: {e}") ``` -------------------------------- ### Read Pfeiffer Maxigauge Pressure Gauges (Python) Source: https://context7.com/eliasankerhold/blueftc/llms.txt Reads pressure values from Pfeiffer Maxigauge units. The controller must be initialized with `activate_maxigauge_reading=True`. Pressure is returned in millibar (mbar). The example shows reading individual channels and monitoring multiple gauges in a loop. ```python # Initialize with pressure gauge support controller = BlueFTController( ip='123.456.789.0', port=12345, key='123456789abcdefghijklmnopqrstuvwxyz', mixing_chamber_channel_id=6, mixing_chamber_heater_id=4, activate_maxigauge_reading=True # Enable pressure reading ) try: # Read pressure from specific gauge channels pressure_ch1 = controller.get_maxigauge_channel(channel=1) print(f"Pressure gauge 1: {pressure_ch1:.2e} mbar") pressure_ch2 = controller.get_maxigauge_channel(channel=2) print(f"Pressure gauge 2: {pressure_ch2:.2e} mbar") # Monitor multiple gauges gauge_channels = [1, 2, 3, 4, 5, 6] pressures = {} for ch in gauge_channels: try: pressure = controller.get_maxigauge_channel(channel=ch) pressures[ch] = pressure print(f"Gauge {ch}: {pressure:.2e} mbar") except Exception as e: print(f"Gauge {ch} not available: {e}") except Exception as e: print(f"Error reading pressure: {e}") ``` -------------------------------- ### Set MXC Heater Setpoint and Get PID Config (Python) Source: https://context7.com/eliasankerhold/blueftc/llms.txt Sets the mixing chamber (MXC) heater setpoint and retrieves the currently applied PID configuration. The system automatically selects the closest PID parameters based on the setpoint. Errors during the operation are caught and printed. ```python try: # When setting setpoint, closest PID parameters are applied automatically controller.set_mxc_heater_setpoint(35.0) # Uses PID params for 30 mK # Check which calibration was used current_pid = controller.get_mxc_heater_pid_config() print(f"Applied PID from calibration: {current_pid}") except Exception as e: print(f"Error: {e}") ``` -------------------------------- ### Read Mixing Chamber Temperature in Python Source: https://context7.com/eliasankerhold/blueftc/llms.txt Gets the mixing chamber temperature using the pre-configured channel ID. The temperature is returned in Kelvin and can be converted to millikelvin for higher precision measurements. ```python # Read mixing chamber temperature try: mxc_temp = controller.get_mxc_temperature() print(f"Mixing chamber temperature: {mxc_temp:.6f} K") # Convert to millikelvin for precision measurements mxc_temp_mk = mxc_temp * 1000 print(f"Mixing chamber temperature: {mxc_temp_mk:.3f} mK") except Exception as e: print(f"Error: {e}") ``` -------------------------------- ### Initialize BlueFTController in Python Source: https://context7.com/eliasankerhold/blueftc/llms.txt Creates a controller instance to communicate with the Bluefors temperature controller. Requires IP address, port, API key, and channel/heater IDs. Handles SSL warnings for self-signed certificates. ```python from blueftc.BlueforsController import BlueFTController import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning # Disable SSL warnings for self-signed certificates requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # Configuration parameters API_KEY = '123456789abcdefghijklmnopqrstuvwxyz' IP_ADDRESS = '123.456.789.0' PORT_NUMBER = 12345 MXC_ID = 6 # Mixing chamber thermometer channel ID HEATER_ID = 4 # Mixing chamber heater ID # Create controller instance controller = BlueFTController( ip=IP_ADDRESS, port=PORT_NUMBER, key=API_KEY, mixing_chamber_channel_id=MXC_ID, mixing_chamber_heater_id=HEATER_ID, debug=False # Set to True for detailed logging ) # Controller is now ready to execute commands ``` -------------------------------- ### Initialize BlueForsController with Credentials - Python Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Import required modules and initialize a BlueForsController instance with IP address, port, API key, and mixing chamber parameters. Optionally disable urllib3 InsecureRequestWarning for HTTPS connections to reduce console output clutter. ```python # import from blueftc.BlueforsController import BlueFTController from credentials import API_KEY, IP_ADDRESS, PORT_NUMBER, MXC_ID, HEATER_ID # -------- OPTIONAL -------- import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # -------------------------- # create controller object controller = BlueFTController(ip=IP_ADDRESS, port=PORT_NUMBER, key=API_KEY, mixing_chamber_channel_id=MXC_ID, mixing_chamber_heater_id=HEATER_ID) ``` -------------------------------- ### Create Credentials Configuration File - Python Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Create a separate credentials.py file to store API configuration including IP address, port number, API key, mixing chamber thermometer ID, and heater ID. This approach improves security and avoids redundant variable definitions across multiple measurement scripts. ```python API_KEY = '123456789abcdefghijklmnopqrstuvwxyz' IP_ADDRESS = '123.456.789.0' PORT_NUMBER = 12345 MXC_ID = 6 HEATER_ID = 4 ``` -------------------------------- ### Emulation Mode Testing for Bluefors Controller in Python Source: https://context7.com/eliasankerhold/blueftc/llms.txt Demonstrates how to initialize and use the BlueforsController in emulation mode. This allows testing script logic without physical hardware, returning mock data for all commands. Useful for debugging and development. ```python from blueftc.BlueforsController import BlueFTController # Initialize in emulation mode controller = BlueFTController( ip='123.456.789.0', port=12345, key='test_key', mixing_chamber_channel_id=6, mixing_chamber_heater_id=4, emulate=True # No actual communication with hardware ) # Test your script logic without hardware try: # All commands will return mock data temp = controller.get_mxc_temperature() print(f"Mock temperature: {temp} K") # Write operations succeed but don't affect hardware controller.set_mxc_heater_power(100) controller.set_mxc_heater_setpoint(30) print("Script logic validated in emulation mode") except Exception as e: print(f"Script error: {e}") ``` -------------------------------- ### Initialize BlueForsController with PID Calibration Source: https://context7.com/eliasankerhold/blueftc/llms.txt Initializes the BlueForsController with specified IP, port, API key, channel, and heater IDs. Crucially, it enables automatic PID parameter adjustment by providing a path to a CSV file containing setpoint-parameter mappings. ```python from blueftc.BlueforsController import BlueFTController # Initialize with PID calibration table controller = BlueFTController( ip='123.456.789.0', port=12345, key='123456789abcdefghijklmnopqrstuvwxyz', mixing_chamber_channel_id=6, mixing_chamber_heater_id=4, pid_calib_path='path/to/pid_calibration.csv' ) # Example CSV format for pid_calibration.csv: # setpoint_mk,p,i,d # 10,0.3,0.05,0.01 # 20,0.4,0.08,0.02 # 30,0.5,0.1,0.03 # 50,0.6,0.12,0.04 ``` -------------------------------- ### Initialize BlueFTController with PID Calibration Table Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Initializes the BlueFTController by specifying the path to a CSV file containing PID calibration data. This allows the controller to automatically adjust PID parameters based on the temperature setpoint. The calibration table requires a header row and four columns: setpoint (mK), P, I, and D parameters. ```python controller = BlueFTController(ip=IP_ADDRESS, port=PORT_NUMBER, key=API_KEY, mixing_chamber_channel_id=MXC_ID, mixing_chamber_heater_id=HEATER_ID, pid_config_path='path/to/my/calibration_table.csv') ``` -------------------------------- ### Initialize BlueFTController to Read Pressure Gauges Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Initializes the BlueFTController and enables the reading of Pfeiffer Vacuum Maxigauge units. This is done by setting `activate_maxigauge_reading` to `True` during object instantiation. ```python controller = BlueFTController(ip=IP_ADDRESS, port=PORT_NUMBER, key=API_KEY, activate_maxigauge_reading=True) ``` -------------------------------- ### Set PID Temperature Setpoint Source: https://context7.com/eliasankerhold/blueftc/llms.txt Sets the target temperature for PID control in millikelvin (mK). Optionally uses a calibration table to adjust PID parameters. Includes verification of the setpoint and monitoring of temperature approach. ```python # Set PID setpoint try: # Set target temperature to 30 mK target_temp_mk = 30.0 success = controller.set_mxc_heater_setpoint(target_temp_mk) if success: print(f"Setpoint set to {target_temp_mk} mK") # Verify the setpoint actual_setpoint = controller.get_mxc_heater_setpoint() print(f"Actual setpoint: {actual_setpoint:.3f} K") # Monitor temperature approach current_temp = controller.get_mxc_temperature() print(f"Current temperature: {current_temp * 1000:.3f} mK") # Set setpoint without using PID calibration table success = controller.set_mxc_heater_setpoint( temperature=50.0, use_pid_calib=False ) if success: print("Setpoint updated without calibration adjustment") except Exception as e: print(f"Error setting setpoint: {e}") ``` -------------------------------- ### Configure PID Control Mode Source: https://context7.com/eliasankerhold/blueftc/llms.txt Enables or disables the PID temperature control mode for the heater. Demonstrates how to switch between PID and manual control and verify the current mode. ```python # Enable PID mode try: # Turn on PID mode success = controller.set_mxc_heater_mode(True) if success: print("PID mode enabled") # Verify mode is_pid = controller.get_mxc_heater_mode() print(f"Current mode: {'PID' if is_pid else 'Manual'}") # Disable PID mode for manual control success = controller.set_mxc_heater_mode(False) if success: print("Manual mode enabled") except Exception as e: print(f"Error setting heater mode: {e}") ``` -------------------------------- ### Temperature Sweep with PID Calibration (Python) Source: https://context7.com/eliasankerhold/blueftc/llms.txt Initializes the BlueFTC controller with a specified PID calibration file for performing temperature sweeps. This allows the system to automatically adjust PID parameters based on the provided calibration data for precise temperature control during sweeps. ```python from blueftc.BlueforsController import BlueFTController import time import numpy as np # Initialize with PID calibration controller = BlueFTController( ip='123.456.789.0', port=12345, key='123456789abcdefghijklmnopqrstuvwxyz', mixing_chamber_channel_id=6, mixing_chamber_heater_id=4, pid_calib_path='pid_calibration.csv' ) ``` -------------------------------- ### Automated Temperature Sweep with PID Control in Python Source: https://context7.com/eliasankerhold/blueftc/llms.txt This script performs an automated temperature sweep on a Bluefors dilution refrigerator. It enables PID mode, turns on the heater, iterates through predefined temperature points, sets setpoints, waits for stabilization, and verifies the actual temperature. Includes error handling and safety measures to turn off the heater. ```python from blueftc.BlueforsController import BlueFTController import time # Define temperature sweep points (in mK) temp_points = [10, 20, 30, 50, 75, 100, 150, 200] # Assuming 'controller' is an initialized BlueFTController instance # controller = BlueFTController(...) try: # Enable PID mode controller.set_mxc_heater_mode(True) print("PID mode enabled") # Turn on heater controller.toggle_mxc_heater('on') print("Heater turned on") for target_temp in temp_points: print(f"\n--- Setting temperature to {target_temp} mK ---") # Set setpoint (PID params automatically adjusted) success = controller.set_mxc_heater_setpoint(target_temp) if success: # Get applied PID parameters pid = controller.get_mxc_heater_pid_config() print(f"PID params: P={pid[0]:.4f}, I={pid[1]:.4f}, D={pid[2]:.4f}") # Wait for temperature stabilization print("Waiting for stabilization...") time.sleep(300) # 5 minutes # Verify temperature actual_temp = controller.get_mxc_temperature() * 1000 print(f"Target: {target_temp} mK, Actual: {actual_temp:.3f} mK") # Perform measurements here # ... your measurement code ... else: print(f"Failed to set temperature to {target_temp} mK") break # Return to base temperature print("\nReturning to base temperature...") controller.set_mxc_heater_setpoint(10.0) except Exception as e: print(f"Error during temperature sweep: {e}") finally: # Safety: turn off heater controller.toggle_mxc_heater('off') print("Heater turned off") ``` -------------------------------- ### Write Control Commands to Temperature Controller - Python Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Execute write operations on the temperature controller requiring read and write API permissions. Control mixing chamber heater power, setpoint, and mode. All write commands return True if successful, False otherwise. Use with caution as these operations can cause hardware damage. ```python # toggle mixing chamber heater status = controller.toggle_mxc_heater('off') # set power of the mixing chamber heater, in microwatts status = controller.set_mxc_heater_power(100) # set the set point of the mixing chamber PID control, in millikelvin status = controller.set_mxc_heater_setpoint(30) # turn the mixing chamber PID control on (True) or off (False) status = controller.set_mxc_heater_mode(True) ``` -------------------------------- ### Read Temperature and Resistance Data - Python Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Perform read-only operations on the temperature controller requiring only read permissions. Retrieve mixing chamber and arbitrary channel temperatures in Kelvin, resistances in Ohm, and heater status information safely without risk of hardware damage. ```python # read mixing chamber temperature, in Kelvin mxc_temp = controller.get_mxc_temperature() # read temperature of arbitrary channel by supplying the corresponding channel ID, in Kelvin temp = controller.get_channel_temperature(channel=1) # read resistance of mixing chamber sensor or arbitrary channel, in Ohm mxc_res = controller.get_mxc_resistance() res = controller.get_channel_resistance(channel=1) # check if the mixing chamber heater is turned or off mxc_heater_status = controller.get_mxc_heater_status() # read power of mixing chamber heater, in microwatts mxc_power = controller.get_mxc_heater_power() # check if the mixing chamber heater is operating in manual (0) or PID (1) mode mxc_mode = controller.get_mxc_heater_mode() # read the temperature setpoint of the mixing chamber heater PID control, in Kelvin mxc_setpoint = controller.get_mxc_heater_setpoint() ``` -------------------------------- ### Read Pressure from Maxigauge Channel Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Retrieves the pressure reading in mBar from a specified Pfeiffer Vacuum Maxigauge channel. This function is available only if `activate_maxigauge_reading` was set to `True` during the `BlueFTController` initialization. ```python pressure = controller.get_maxigauge_channel(channel=channel_number) ``` -------------------------------- ### Read Heater Power and Status Source: https://context7.com/eliasankerhold/blueftc/llms.txt Retrieves the current heater power in microwatts, checks if the heater is active, and determines the current control mode (manual or PID). If in PID mode, it also reads the temperature setpoint. ```python # Read heater information try: # Check if heater is on heater_on = controller.get_mxc_heater_status() print(f"Heater active: {heater_on}") # Get current power output current_power = controller.get_mxc_heater_power() print(f"Current heater power: {current_power:.2f} μW") # Get heater mode (manual or PID) pid_mode = controller.get_mxc_heater_mode() mode_str = "PID" if pid_mode else "Manual" print(f"Heater mode: {mode_str}") # If in PID mode, get setpoint if pid_mode: setpoint = controller.get_mxc_heater_setpoint() print(f"PID setpoint: {setpoint:.3f} K") except Exception as e: print(f"Error reading heater status: {e}") ``` -------------------------------- ### Control Mixing Chamber Heater On/Off in Python Source: https://context7.com/eliasankerhold/blueftc/llms.txt Toggles the mixing chamber heater between ON and OFF states. Returns True if the operation is successful. Includes checks for current status before attempting to change it. ```python # Turn heater on try: # Check current status first current_status = controller.get_mxc_heater_status() print(f"Current heater status: {'ON' if current_status else 'OFF'}") # Turn heater off for safety success = controller.toggle_mxc_heater('off') if success: print("Heater successfully turned OFF") else: print("Failed to toggle heater") # Turn heater on when needed success = controller.toggle_mxc_heater('on') if success: print("Heater successfully turned ON") # Verify the change new_status = controller.get_mxc_heater_status() print(f"New heater status: {'ON' if new_status else 'OFF'}") except Exception as e: print(f"Error controlling heater: {e}") ``` -------------------------------- ### Manually Set MXC Heater Setpoint with PID Calibration Source: https://github.com/eliasankerhold/blueftc/blob/main/README.md Sets the mixing chamber heater setpoint. By default, if a PID calibration table is provided, this function will first identify the closest PID parameters from the table to the desired temperature setpoint, apply them, and then change the setpoint. This behavior can be overridden by setting `use_pid_calib` to `False`. ```python controller.set_mxc_heater_setpoint(temperature=my_setpoint) controller.set_mxc_heater_setpoint(temperature=my_setpoint, use_pid_calib=False) ``` -------------------------------- ### Read Channel Resistance in Python Source: https://context7.com/eliasankerhold/blueftc/llms.txt Retrieves the resistance value of a thermometer channel in Ohms. This is useful for calibration and diagnostics. It can read resistance for specific channels or the mixing chamber, and can be correlated with temperature readings. ```python # Read resistance from channel 1 try: resistance_ch1 = controller.get_channel_resistance(channel=1) print(f"Channel 1 resistance: {resistance_ch1:.2f} Ohm") # Read mixing chamber resistance mxc_resistance = controller.get_mxc_resistance() print(f"Mixing chamber resistance: {mxc_resistance:.2f} Ohm") # Monitor multiple channels for ch in [1, 2, 6]: res = controller.get_channel_resistance(channel=ch) temp = controller.get_channel_temperature(channel=ch) print(f"Channel {ch}: {temp:.4f} K ({res:.2f} Ohm)") except Exception as e: print(f"Error reading resistance: {e}") ``` -------------------------------- ### Read Channel Temperature in Python Source: https://context7.com/eliasankerhold/blueftc/llms.txt Retrieves the current temperature reading from a specified thermometer channel in Kelvin. Can read single or multiple channels, handling potential errors during the process. ```python # Read temperature from channel 1 try: temp_channel_1 = controller.get_channel_temperature(channel=1) print(f"Channel 1 temperature: {temp_channel_1:.6f} K") # Read multiple channels active_channels = [1, 2, 5, 6, 8] temperatures = {} for ch in active_channels: temp = controller.get_channel_temperature(channel=ch) temperatures[ch] = temp print(f"Channel {ch}: {temp:.6f} K") except Exception as e: print(f"Error reading temperature: {e}") ``` -------------------------------- ### Set Mixing Chamber Heater Power in Python Source: https://context7.com/eliasankerhold/blueftc/llms.txt Sets the power level of the mixing chamber heater in microwatts (μW). The valid range for power is 0 to 5000 μW. This function allows for precise control of heating elements. ```python # Example: Set heater power to 1000 microwatts HEATER_POWER_UW = 1000 try: success = controller.set_mxc_heater_power(power_microwatts=HEATER_POWER_UW) if success: print(f"Successfully set heater power to {HEATER_POWER_UW} μW") else: print(f"Failed to set heater power to {HEATER_POWER_UW} μW") # Example: Turn heater off by setting power to 0 success = controller.set_mxc_heater_power(power_microwatts=0) if success: print("Successfully turned heater OFF by setting power to 0 μW") else: print("Failed to turn heater OFF") except Exception as e: print(f"Error setting heater power: {e}") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.