Skip to main content

Intellio Python Module

Agilo Research Pvt Ltd (STEMpedia)

Connect Intellio hardware to Python to build robotics, sensor, computer-vision, and AI projects.

The Intellio Python module exposes the QuarkyIntellio class. It connects to an Intellio board using a Bluetooth Low Energy (BLE) Wi-Fi setup flow, receives camera images over Wi-Fi, and provides Python methods for hardware controls such as LEDs, audio, motors, servos, and supported external sensors.

It can be combined with OpenCV, MediaPipe, and NumPy to build hand-tracking, gesture-recognition, eye-tracking, and other interactive projects on a computer.

Documentation scope: This README is based on the Intellio/camera.py, ble.py, ble_gui.py, and stream.py source versions shared during development. It documents the methods implemented in that source, not a certification that every method has been tested on every firmware revision. In particular, Lightning RGB uses a special send-only workaround on the tested device; see Lightning compatibility note.

Contents

Features

  • BLE-assisted Wi-Fi configuration and automatic Intellio IP discovery.
  • Live JPEG camera frames delivered to Python as OpenCV-compatible NumPy arrays.
  • Hardware commands for onboard LED, motors, servos, speaker and audio, camera settings, and supported external sensors.
  • Lightning extension commands for RGB strips and an 8x8 LED matrix.
  • Integration with Python computer-vision libraries without running hand-tracking inference on the microcontroller.

Requirements

Hardware

  • Intellio board with compatible firmware.
  • A Windows, Linux, or macOS computer with Bluetooth Low Energy and Wi-Fi.
  • Intellio and the laptop connected to the appropriate network after BLE setup.
  • Optional hardware for examples: ultrasonic/IR sensor, RGB LED matrix, OLED, supported color/motion sensors, or motors.

Software

  • Python 3.9 or newer for the SDK.
  • A Python virtual environment or Conda environment.
  • tkinter and a desktop session for the BLE setup window. The camera and vision demos also open graphical windows.
  • bleak, opencv-python, and numpy are installed with the SDK.

The pip distribution is named quarky-intellio. Python code imports it as Intellio.

Project structure

Intellio_pip/
|-- Intellio/
|   |-- __init__.py
|   |-- camera.py         # QuarkyIntellio public hardware API
|   |-- ble.py            # BLE scanning and GATT communication
|   |-- ble_gui.py        # Connection manager
|   `-- stream.py         # JPEG-over-UDP camera receiver
|-- Examples/
|-- EXAMPLES.md
|-- pyproject.toml
`-- README.md

The examples guide contains the commands and code samples for the projects in this repository.

Set up your development environment

Open a terminal in the repository root, where pyproject.toml is located. Choose one environment below, then continue to Install dependencies.

Windows

Install Python 3.12 with Tcl/Tk support. In PowerShell, create and activate the environment. Python on Windows

py -3.12 -m venv air-env
.\air-env\Scripts\Activate.ps1

In Command Prompt, activate with air-env\Scripts\activate.bat. In Git Bash, use source air-env/Scripts/activate. If PowerShell blocks script activation, use Command Prompt or run .\air-env\Scripts\python.exe directly in place of python in the install and run commands below. Python virtual environments

Linux

On Ubuntu or Debian, install Python, Tk, and the Bluetooth and networking tools. The commands below use the distribution's default Python. Check python3 --version, and use the Conda setup below if you need Python 3.12 for the vision examples. Ubuntu Python packages · Ubuntu BlueZ package

sudo apt update
sudo apt install python3 python3-venv python3-tk bluez iproute2 libgl1
python3 -m venv air-env
source air-env/bin/activate

On Fedora, install the equivalent system packages and create the environment. Fedora Tkinter package

sudo dnf install python3 python3-pip python3-tkinter bluez iproute libglvnd-glx
python3 -m venv air-env
source air-env/bin/activate

For BLE setup, enable Bluetooth and check that bluetoothctl show lists an adapter. On a systemd desktop, start the Bluetooth service with sudo systemctl start bluetooth if it is stopped. Bleak uses BlueZ on Linux. Bleak Linux backend

macOS

Install Python 3.12 from python.org, then create a virtual environment from Terminal. If macOS asks for Bluetooth access, allow it for the app running Python. If access was denied, check System Settings > Privacy & Security > Bluetooth. Python on macOS · Bleak macOS troubleshooting

python3.12 -m venv air-env
source air-env/bin/activate

Conda

From a shell initialized for Conda, create an environment with Python 3.12, pip, and Tk. On Linux, complete the system Bluetooth setup above before using the board. Conda environment creation

conda create -n air-env python=3.12 pip tk
conda activate air-env

VS Code, PyCharm, and WSL

  • VS Code. Open the repository, install the Python extension, and run Python: Select Interpreter. Choose the environment you created, then open a new integrated terminal. VS Code Python environments
  • PyCharm. Open the repository and select your existing environment in the Python Interpreter settings. Set the run configuration's working directory to the repository root. PyCharm interpreter setup
  • WSL. Use the Linux instructions for package development. For board tests, use native Windows unless WSL has access to a Bluetooth adapter, a graphical desktop, and incoming UDP traffic from the board. WSL USB devices · WSL networking

Install dependencies

With the environment active, confirm which Python you are using. Run python -m tkinter to verify that a small Tk window opens, then close it.

python --version
python -c "import sys; print(sys.executable)"
python -m tkinter

For SDK development, install from the repository in editable mode.

python -m pip install -e .

To install the latest release from PyPI, run python -m pip install --upgrade quarky-intellio. If you downloaded a wheel, run python -m pip install <wheel-filename> from the download directory, replacing <wheel-filename> with the actual filename.

Verify the SDK and its dependencies. Run the import from outside the repository if you want to confirm it resolves through your environment.

python -m pip check
python -c "from Intellio import QuarkyIntellio; print(QuarkyIntellio.__name__)"

Connect to Intellio

  1. Power on Intellio and enable Bluetooth and Wi-Fi on your laptop.
  2. Run the connection example. connect() opens the Intellio BLE/Wi-Fi manager.
  3. Scan for Intellio, select the board, and connect over Bluetooth.
  4. Supply Wi-Fi credentials and choose Station Mode (through a router) or the compatible AP setup for your firmware.
  5. Wait for the program to print a discovered Intellio IP address.
  6. Close the connection-manager window to allow the script to continue. The existing implementation starts the camera-stream receiver automatically when the IP is discovered.

connect() blocks while the Tkinter window is open. You can also instantiate with a known IP, QuarkyIntellio(ip="192.168.x.x"), but that bypasses BLE discovery and does not automatically start the camera stream; call startstream() explicitly when using that approach.

Communication used by the supplied implementation

Channel Purpose Configuration in source
BLE Device discovery and Wi-Fi provisioning ble.py and ble_gui.py
UDP 5005 on PC Incoming JPEG camera frames stream.py
UDP 5006 on device Outgoing PC hardware-control commands camera.py
UDP 5007 on PC Expected hardware-control replies camera.py socket binding

Port numbers describe the shared Python implementation. The actual board firmware and network must support the same transport for hardware commands to work.

Complete API reference

All methods below are on an instance of QuarkyIntellio. Names and argument order match the shared camera.py; Python method names are case-sensitive. The class includes 54 public methods in the supplied version, plus internal helpers documented at the end.

Connection and video

Method Description / parameters
QuarkyIntellio(ip=None) Create the client. Optional ip skips IP discovery but not the need for compatible Wi-Fi connectivity.
connect() Open BLE/Wi-Fi manager; wait for window to close. IP notification also starts the stream in this source version.
startstream() Start receiving camera frames on UDP 5005.
get_frame() Return latest BGR OpenCV frame, or None while unavailable.
stopstream() Stop the receiver and release its UDP port before returning.

Robot motors and servos

Method Description / parameters
runrobot(direction, speed) Robot direction: 1 forward, 2 backward, 3 left, 4 right, 5 stop; speed 0-100 as documented in source.
runbothmotors(left_speed, right_speed) Drive left/right motors at separate speed values.
stoprobot() Stop robot motors.
runmotor(motor, direction, speed) Motor 'L' or 'R'; direction 1 forward, 2 backward, 3 lock, 4 stop.
stopmotor(motor) Stop one motor ('L' or 'R').
setservo(pin, angle) Logical servo pin: 0=S1, 1=A2, 2=A1; angle 0-180 degrees.
servomoveintime(pin, angle, seconds) Move a servo to an angle over the requested duration.

Motor-control methods are documented from the Python implementation. Some mappings may require alignment with the specific firmware and expansion-board configuration; do not assume all have been hardware-verified.

Built-in RGB LED

Method Description / parameters
setled(r, g, b, brightness=30) Set Intellio's built-in RGB LED, with requested brightness.
turnoffled() Turn off the built-in LED.

Lightning RGB strips and 8x8 LED matrix

Method Description / parameters
initialisergb(strip, numled, pin) Initialize strip index (1 is typical), number of LEDs (64 for an 8x8 matrix), and firmware-expected pin identifier. Command 73.
setrgbpixel(strip, pixel, r, g, b) Set a zero-based pixel index; send showrgb() to apply it. Command 74.
showrgb(strip) Push pending pixel colors to the physical LEDs. Command 75.
showpattern1(pattern, strip, r, g, b, delay_ms) 1 Color Wipe, 2 Theater Chase. Delay in milliseconds. Command 76.
showpattern2(pattern, strip, delay_ms) 1 Rainbow, 2 Rainbow Cycle, 3 Theater Chase Rainbow. Delay in milliseconds. Command 77.
clearrgb(strip) Clear the strip/matrix. Command 78.

See the RGB matrix example and the Lightning compatibility note.

Ultrasonic and digital/analog sensors

Method Description / parameters
setultrasonicpins(trig, echo) Assign distinct ports from 'A1', 'A2', 'S1' to trigger and echo. Validates the names.
getultrasonic() Read distance as a float from firmware.
readdigital(pin) Read digital state 0 or 1; uses GET action.
prepare_ir_input(pin="A1") Prepare A1/A2 for IR/digital input by switching PWM/analog state as required by this firmware.
readanalog(pin) Read an analog value as float or None; source documents 'A1'/'A2'.
readpushbutton(button) Read left (1) or right (2) pushbutton as float or None.

The ultrasonic and IR input paths were tested during development. Other sensor methods are included because they exist in camera.py; confirm action-code compatibility before release.

Color and proximity sensor (APDS9960)

Method Description / parameters
initcolorsensor() Initialize the attached color/proximity sensor; returns True only on exact "Done".
getlightlevel(channel=0) 0 clear, 1 red, 2 green, 3 blue channel; numeric result or None.
iscolordetected(color) Check a firmware-defined color index; returns boolean.
getproximity() Proximity value, documented 0-255, or None.
recordcolorprofile(slot) Save a color profile to slot 0-7; returns boolean in this implementation.
deleteallcolorprofiles() Clear recorded profiles; returns raw firmware response.
iscolorprofiledetected(slot) Check whether a saved profile is detected; returns boolean.
isgesturedetected(gesture) Sensor gesture indices: 0 none, 1 up, 2 down, 3 left, 4 right. Not the same as MediaPipe hand tracking.

Motion sensor (MPU6050)

Method Description / parameters
initmotionsensor() Initialize supported motion sensor; returns boolean on exact "Done".
getacceleration(axis) Read acceleration, axis 0=X, 1=Y, 2=Z; float or None.
getgyroscope(axis) Read gyroscope value for axis 0=X, 1=Y, 2=Z; float or None.
gettiltangle(axis) Read tilt-angle value for axis 0=X, 1=Y, 2=Z; float or None.
gettemperature() Read sensor temperature in Celsius, or None.

OLED display

Method Description / parameters
initoled() Request OLED initialization; returns boolean on exact "Done".
clearoled() Clear OLED display; returns boolean.
displaytext(text) Display text; returns boolean.
scrolltext(text) Scroll supplied text; returns boolean.
displayemotion(emotion) Display a firmware-defined emotion index; returns boolean.

Status note: OLED initialization was not confirmed working in the shared firmware. The device-side advancesensorhandler() section previously contained _ensure_oled without calling it, so a Done response does not prove that the display initialized. This cannot be fixed solely by documenting or calling initoled() from the PC. Avoid advertising OLED as tested until verified on the release firmware.

Speaker and audio

Method Description / parameters
playsound(filename, volume=80) Play a sound by filename available to the device/firmware.
playsounduntildone(filename, volume=80) Play and wait for completion response; returns boolean based on "done".
stopsound() Stop currently playing device sound.
setvolume(volume) Set speaker volume, documented 0-100 by source.
playtone(frequency, duration_ms) Play a tone of the specified frequency (Hz) for the specified duration (milliseconds); validates positive values and waits for response.

playtone() generates a tone, not synthesized speech. A file passed to playsound() must be accessible to the Intellio firmware; an arbitrary filename on the laptop is not automatically transferred to the device.

Camera settings

Method Description / parameters
setbrightness(value) Set camera brightness. Firmware defines the accepted range.
setcontrast(value) Set contrast. Firmware defines the accepted range.
setsaturation(value) Set saturation. Firmware defines the accepted range.
setquality(value) Set camera JPEG quality setting. Firmware defines the accepted range.
setvflip(value) Enable/disable vertical flip (commonly 0/1).
sethmirror(value) Enable/disable horizontal mirroring (commonly 0/1).
Method Role
_send(*args, action=2, timeout=None) Build a frame/{action}/... command, send via UDP 5006, and await response on the client's UDP socket.
_rgb_request(command, *args) Lightning transport helper; special handling described below.
_send_sensor(*args) Wrap hardware command 215 for advanced sensors.
_send_setting(*args) Send setting/... commands to the device.
_set_ip(ip) Validate/set the discovered IP; starts the camera receiver on discovery.

Other implementation components:

  • BLEManager (ble.py): scan(), connect(address), disconnect(), send(data), start_notify(callback), and is_connected. These are asynchronous BLE utilities used by the connection manager.
  • BLEApp (ble_gui.py): Tkinter UI for scanning, connecting, provisioning Wi-Fi, and forwarding an IP notification to QuarkyIntellio.
  • CameraStream (stream.py): start(), stop(), and get_frame(); background _receiver() assembles JPEG data packets into decoded OpenCV frames.

Lightning compatibility note

The hardware-tested development setup required a send-only Lightning request. The earlier uploaded camera.py source used the regular request-response helper and raised WinError 10054 during RGB initialization. In a later local test, replacing _rgb_request() with a send-only command sender allowed the LED matrix to work. Ultrasonic and IR should continue using the original _send() request-response path.

See the send-only implementation for older checkouts. This approach confirms that the SDK sent the command. Firmware execution remains unconfirmed.

Avoid calling long-running Rainbow patterns continuously in a live camera loop: pattern execution may block firmware control, and repeated calls can cause sluggish video or lost device commands. Prefer short Color Wipe updates triggered only by confirmed gesture changes.

Troubleshooting

Symptom What to check
ModuleNotFoundError: No module named 'Intellio' Install the SDK in the same environment that runs your script and use the exact capitalization Intellio.
No module named 'mediapipe', cv2, or bleak Activate the intended air-env, then install the missing package with python -m pip.
No module named 'tkinter' or the Tk window cannot open Run python -m tkinter and check the Tk installation and desktop session for your platform.
Linux cannot find a Bluetooth adapter Check bluetoothctl show, the BlueZ service, and Bluetooth access in the environment running Python.
Connection manager opens but no IP appears Check BLE connection, Wi-Fi credentials, compatible Station/AP mode, laptop network, and notifications.
get_frame() returns None Wait for camera stream, check network and UDP 5005, and ensure only one program owns the receiver port.
[WinError 10054] during hardware command Check the board's UDP control service, correct device IP/port, and firmware; the camera stream can work independently of hardware commands.
Ultrasonic/IR works but Lightning errors Check whether the repo uses the tested send-only _rgb_request(); leave general _send() unchanged.
Lightning command prints SENT_UNCONFIRMED but nothing lights Confirm firmware/device receives command, strip initialization, pin mapping, LED type, power supply, data connection, and shared ground.
Rainbow animation appears stuck Animation can be long or blocking; use shorter effects and avoid repeated requests.
OLED reports False Check board firmware's OLED initialization implementation and hardware wiring; a PC-only change may not resolve it.
Video freezes while playing audio Avoid blocking speaker commands on the frame-processing thread; serialize device commands in a worker.
Address already in use on UDP 5005/5007 Close duplicate Python scripts or other processes holding those ports.

Support and development

For board questions, see the Quarky Intellio documentation or contact STEMpedia support.

In a repository checkout or unpacked source archive, see the changelog, contribution guide, and security reporting instructions.

Terms of Use

These conditions apply to use of the Intellio Python SDK and its example projects.

  • Use the SDK for lawful purposes. Connect only to boards and networks you own or have permission to use.
  • Follow the hardware instructions and test scripts in a controlled environment before enabling motors, servos, or other attachments. Do not rely on the SDK or example projects for safety-critical decisions or emergency alerts.
  • Respect the privacy of people within the camera's view. Obtain any required permissions before recording, storing, or sharing images, video, or biometric data.
  • Follow any licenses supplied with the SDK, third-party libraries, and example assets.

For Agilo Research Pvt Ltd's published terms and privacy information, see the STEMpedia Terms and Conditions and Privacy Policy.

Metadata

Release files for quarky-intellio 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quarky-intellio 0.1.4
File Size Uploaded Provenance Actions
quarky_intellio-0.1.4.tar.gz 681.3 kB Without provenance Details for quarky_intellio-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quarky-intellio 0.1.4
File Interpreter ABI Platform Actions
quarky_intellio-0.1.4-py3-none-any.whl Python 3 none any Details for quarky_intellio-0.1.4-py3-none-any.whl

Total release size: 704.6 kB

Release files / quarky_intellio-0.1.4.tar.gz

Download URL quarky_intellio-0.1.4.tar.gz
Size 681.3 kB
Tags Source
SHA-256 checksum
How to use checksums
64d6ae025606085e4c0192f590363441a405e893e4b2a212c059e3b0cf18a777
BLAKE2b-256 checksum
How to use checksums
9e154129d3814d7b49e73c9d7833681cd6b5216f524cadf655484bc315fe63d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release files / quarky_intellio-0.1.4-py3-none-any.whl

Download URL quarky_intellio-0.1.4-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e29b39100110aa2a3ff4a8653660bedfec22a51febd01ddd1e9b5bc14c34733
BLAKE2b-256 checksum
How to use checksums
ca72ce000ed16e470ee9600996036cb79770e467d164fe1e9517b138298f9555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Security for quarky-intellio 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page