PC & Laptop

A regular desktop or laptop has zero GPIO — no PWM, no I2C, no analog input, no servo header, no relay terminal. Just USB, audio jacks, and a network port, all abstracted away from the physical world. The only way for code on a PC to touch something is through a peripheral someone else already built: a printer, a webcam, a USB mouse.
DUELink turns any USB port into a chain of hundreds of sensors and actuators. Plug in a USB Hook, connect any DUELink module, and your Python, JavaScript, .NET, or Excel script can read a temperature, drive a servo, switch a relay, light up a smart-LED strip, decode a barcode, or capture a thermal frame — without buying a board, soldering a circuit, or learning a vendor-specific SDK.
For AI and ML work this is especially powerful — physical-world inputs and outputs in the same Python script as your model:
- Sensor → model — temperature, distance, motion, sound, or vision data straight into PyTorch, scikit-learn, or NumPy
- Model → actuator — let a classifier drive a relay, motor, LED, or display in real time
- Reproducible demos — every researcher plugs into the same USB Hook and runs the same code
- No deployment hardware — finish the demo on the laptop you already have
Demo: web-based control​
Our demo is built using JavaScript and offers an excellent starting point to play with DUELink modules and see how the web can be used to access sensors and actuators.

Artificial Intelligence (AI) applications that use Python can take advantage of the entire DUELink ecosystem. This demo uses facial detection to move a servo (to open a door!)

This demo uses a USB Hook with Servo X1 module, but any other modules, or multiple modules, can be used as well.

- Python
- JavaScript
from DUELink.DUELinkController import DUELinkController
availablePort = DUELinkController.GetConnectionPort()
print("Using port: ", availablePort)
duelink = DUELinkController(availablePort)
# Servo on pin 1 to 90 degrees
duelink.Servo.Set(1, 90)
const { SerialUSB } = require("dlserialusb");
const { DUELinkController } = require("duelink");
async function MoveServo() {
let duelink = new DUELinkController(new SerialUSB());
await duelink.Connect();
// Servo on pin 1 to 90 degrees
await duelink.Servo.Set(1, 90)
}
await MoveServo();
Wireless Connections​
A WiFi or a Bluetooth wireless interface can also be used instead of USB.

See Wireless Interface for more details.