Connecting to MC1 by Qubitekk in Python
Instrument Card
Device Specification: here
Manufacturer card: QUBITEKK
Qubitekk provides reliable products for generating, preparing, distributing, detecting, correlating and storing photonic qubits. The hardware that is needed to strengthen American leadership in quantum computing, communications, and sensing solutions is being developed and manufactured in San Diego County, CA.
- Headquarters: Vista, California, United States
- Yearly Revenue (millions, USD): 5
- Vendor Website: here
Demo: Send commands to a Polulu stepper motor driver
Connect to the MC1 in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
from instrumentkit import SerialConnectionfrom instrumentkit import MC1
# Create a serial connection to the MC1 controllerconnection = SerialConnection(port='/dev/ttyUSB0', baudrate=9600)mc1 = MC1(connection)
# Set the stepping increment valuemc1.increment = 2 # milliseconds
# Get the current motor positionposition = mc1.internal_positionprint(f"Current position: {position}")
# Move the motor to a new positionnew_position = 500 # millisecondsmc1.move(new_position)
# Check if the motor is centeringis_centering = mc1.is_centering()print(f"Is centering: {is_centering}")
# Reset the motor to its limitmc1.reset()
# Close the connectionconnection.close()
This script demonstrates how to connect to the MC1 controller, set the stepping increment value, get the current motor position, move the motor to a new position, check if the motor is centering, and reset the motor to its limit.