PC & Laptop
PCs and Laptops (Windows, Linux, or mac OS) can finally have an easy access to hundreds of sensors and actuators. There are many Coding Language options to cover every need.
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
WiFi and Bluetooth Wireless interfaces can also be used instead of USB. In the case where Bluetooth is used, a virtual com port is established and the provided libraries simply work!