### lq.start() Source: https://vernierst.github.io/labquest-examples Starts data collection at a specified sampling period. ```APIDOC ## lq.start() ### Description Starts collecting data at a specified period in milliseconds. If the argument is blank, a terminal prompt will appear. ### Parameters - **period** (int) - Optional - Time between samples in milliseconds. ``` -------------------------------- ### Periodic Data Collection Program Source: https://vernierst.github.io/labquest-examples A complete example demonstrating how to open a connection, select a sensor, start periodic data collection, and read values in a loop. ```python from labquest import LabQuest lq = LabQuest() lq.open() lq.select_sensors(ch1='lq_sensor') lq.start(100) for x in range(10): ch1_measurement = lq.read('ch1') if ch1_measurement == None: break print(ch1_measurement) lq.stop() lq.close() ``` -------------------------------- ### Initialize LabQuest Device Source: https://vernierst.github.io/labquest-examples Required setup to import the module and instantiate the LabQuest class for device communication. ```python from labquest import LabQuest lq = LabQuest() ``` -------------------------------- ### Start Data Collection Source: https://vernierst.github.io/labquest-examples Initiates data collection with a specified sampling period in milliseconds. ```python lq.start(1000) ``` ```python lq.start(100) ``` -------------------------------- ### Start data collection Source: https://vernierst.github.io/labquest-examples Initiates data collection without a sampling period for photogate timing. ```python lq.start() ``` -------------------------------- ### lq.open() Source: https://vernierst.github.io/labquest-examples Opens communication to the LabQuest device via USB. ```APIDOC ## lq.open() ### Description Opens communication to your LabQuest device from your computer via USB. No arguments are required. ### Parameters None ``` -------------------------------- ### Configure Sensors with select_sensors Source: https://vernierst.github.io/labquest-examples Configures sensors on specific channels. Arguments can be omitted to trigger an interactive terminal prompt. ```python lq.select_sensors(ch1='lq_sensor') ``` ```python lq.select_sensors(ch1='lq_sensor', ch2='lq_sensor_cal1') ``` ```python lq.select_sensors(ch1='lq_sensor', dig1='motion'}) ``` ```python lq.select_sensors(ch1='raw_voltage') ``` -------------------------------- ### lq.photogate_timing() Source: https://vernierst.github.io/labquest-examples Collects timing data from a photogate sensor. This function returns a list of blocked and unblocked time measurements. ```APIDOC ## lq.photogate_timing(port, num_samples, timeout) ### Description Collects timing measurements from a photogate connected to a digital port. Unlike analog sensors, this does not use a sampling period. ### Parameters - **port** (string) - Required - The digital port the photogate is connected to (e.g., 'dig1'). - **num_samples** (integer) - Required - The number of blocked and unblocked timing measurements to collect. - **timeout** (integer) - Required - The maximum time in seconds to wait for measurements before timing out. ### Returns - **measurements** (list) - A list of timing measurements representing blocked and unblocked durations. ``` -------------------------------- ### lq.select_sensors() Source: https://vernierst.github.io/labquest-examples Configures the sensors connected to the LabQuest channels. ```APIDOC ## lq.select_sensors() ### Description Configures all sensors used in the program. If arguments are omitted, a terminal prompt allows manual configuration. ### Parameters - **ch1, ch2, ch3** (string) - Optional - Sensor type for analog channels ('lq_sensor', 'lq_sensor_cal0', 'lq_sensor_cal1', 'lq_sensor_cal2', 'raw_voltage') - **dig1, dig2** (string) - Optional - Sensor type for digital channels ('motion', 'rotary_motion', 'rotary_motion_high_res', 'photogate_count', 'photogate_timing', 'dcu', 'dcu_pwm') ``` -------------------------------- ### Standard LabQuest Workflow Functions Source: https://vernierst.github.io/labquest-examples The core sequence of functions required to initialize, collect data from, and shut down a LabQuest device. ```python lq.open() lq.select_sensors() lq.start() lq.read() lq.stop() lq.close() ``` -------------------------------- ### Collect photogate timing data Source: https://vernierst.github.io/labquest-examples Use this function to retrieve a list of blocked and unblocked timing measurements from a photogate. The function requires the port, number of samples, and a timeout duration. ```python measurements = lq.photogate_timing('dig1', 15, 10) ``` -------------------------------- ### lq.read() Source: https://vernierst.github.io/labquest-examples Reads a single data point from a specified channel. ```APIDOC ## lq.read() ### Description Returns a single point reading from the selected channel. Best for long, slow data acquisition. ### Parameters - **channel** (string) - Required - The channel to read (e.g., 'ch1', 'dig1'). ``` -------------------------------- ### lq.stop() Source: https://vernierst.github.io/labquest-examples Stops data collection and optionally controls DCU output lines. ```APIDOC ## lq.stop(stop_measurements=True, stop_dcu=True, stop_pwm=True) ### Description Stops data collection on selected sensors. Can also be used to independently stop DCU output lines or PWM output. ### Parameters - **stop_measurements** (boolean) - Optional - Whether to stop data collection. - **stop_dcu** (boolean) - Optional - Whether to turn off all DCU output lines. - **stop_pwm** (boolean) - Optional - Whether to stop PWM output. ``` -------------------------------- ### lq.close() Source: https://vernierst.github.io/labquest-examples Disconnects and closes communication with the LabQuest device. ```APIDOC ## lq.close() ### Description Disconnects the LabQuest device. No further lq functions can be called after this is invoked. ``` -------------------------------- ### lq.read_multi_pt() Source: https://vernierst.github.io/labquest-examples Reads multiple data points from a specified channel. ```APIDOC ## lq.read_multi_pt() ### Description Returns multi-point readings from the selected channel. Best for capturing large amounts of data in a short time. ### Parameters - **channel** (string) - Required - The channel to read. - **points** (int) - Required - The number of data points to collect. ``` -------------------------------- ### Stop data collection and DCU output Source: https://vernierst.github.io/labquest-examples Controls the cessation of data collection and DCU outputs. Arguments allow for independent control of measurements, DCU lines, and PWM output. ```python stop(stop_measurements=False, stop_dcu=False, stop_pwm=True) ``` -------------------------------- ### Read Multi-Point Data Source: https://vernierst.github.io/labquest-examples Retrieves a specified number of data points from a channel. Ideal for capturing high-frequency data over short durations. ```python ch1_measurements = lq.read_multi_pt('ch1', 100) ``` -------------------------------- ### Read Single Point Data Source: https://vernierst.github.io/labquest-examples Retrieves a single measurement from a specific channel. Best suited for long, slow data acquisition. ```python ch1_measurement = lq.read('ch1') ``` ```python dig1_measurement = lq.read('dig1') ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.