SDK for Voxel
Project description
Voxel SDK
Concise tools to control a Voxel device over wired serial or BLE, capture media, and stream to your computer.
Install
Default install includes everything (BLE, Serial, and the stream viewer):
pip install voxel-sdk
Optional (for video conversion): install ffmpeg (e.g., brew install ffmpeg on macOS).
Quickstart
1) Terminal (interactive CLI)
Run the built-in terminal (no separate entry point needed):
python -m voxel_sdk.terminal
- Choose connection:
- Wired: select “Wired” or run with flags:
python -m voxel_sdk.terminal --transport serial --port /dev/cu.usbmodem1101 - BLE: select “Bluetooth” or run with flags:
python -m voxel_sdk.terminal --transport ble --ble-name voxel
- Wired: select “Wired” or run with flags:
Once connected you’ll see a prompt like voxel>. A few useful commands:
- List files:
voxel> ls /
- Capture a photo to the device:
voxel> camera-capture /photos myphoto 1600x1200
voxel> ls /photos
- Download the photo to your computer (current directory):
voxel> download /photos/myphoto.jpg myphoto.jpg
- Stream live video to your computer with a local viewer (press
qto quit):
voxel> stream 9000
Notes:
- Stream viewer requires OpenCV + NumPy (installed by default). If you built a minimal env without them, install
opencv-pythonandnumpy. - You can stop a remote stream with
stream-stop.
2) Python SDK
Use the high-level controller with Serial or BLE transports.
- Take a photo and save it locally:
from voxel_sdk.device_controller import DeviceController
from voxel_sdk.ble import BleVoxelTransport # or: from voxel_sdk.serial import SerialVoxelTransport
# Connect (BLE)
transport = BleVoxelTransport(device_name="voxel")
transport.connect("") # scans for a device whose name starts with "voxel"
controller = DeviceController(transport)
# Ask the device to capture a photo to its filesystem
controller.execute_device_command("camera_capture:/photos|myphoto|640x480")
# Download the photo to your computer
jpeg_bytes = controller.download_file("/photos/myphoto.jpg")
with open("myphoto.jpg", "wb") as f:
f.write(jpeg_bytes)
transport.disconnect()
- Stream live video with a local viewer:
from voxel_sdk.device_controller import DeviceController
from voxel_sdk.ble import BleVoxelTransport # or SerialVoxelTransport
transport = BleVoxelTransport(device_name="voxel")
transport.connect("")
controller = DeviceController(transport)
# Opens an OpenCV window; press 'q' to quit
controller.stream_with_visualization(port=9000)
transport.disconnect()
Tips:
- On macOS, serial ports often look like
/dev/cu.usbmodem*or/dev/tty.usbserial*. - If you’re unsure of the saved image filename, run
ls /photosin the terminal first, then use that path indownload/download_file.
Extras
- Default install already includes these. Extras exist only if you want a minimal/custom install:
ble: Bluetooth Low Energy (viableak)serial: Wired serial (viapyserial)viz: Local viewer for streaming (viaopencv-python,numpy)all: Installs all of the above
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file voxel_sdk-0.1.1.tar.gz.
File metadata
- Download URL: voxel_sdk-0.1.1.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea1e528d93e911d89ded50e7da9d15368221a6b61e4bed50bd6d4f73c0d6b095
|
|
| MD5 |
49c03637131a4884b414e0356d3925c5
|
|
| BLAKE2b-256 |
ec749559ed7d15b47e6c9e4f32cf07a9db1fb8ba519e3b9b5d951e3846c4a769
|
File details
Details for the file voxel_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: voxel_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e80805c2401b25d12872380a1fcbbd01f0b8a96902a35755d4a6e1c4b54d2cd
|
|
| MD5 |
440b2251a469695ece71740cd47cb9cf
|
|
| BLAKE2b-256 |
17c25ba5742ceb7ad3cbc3ee21fc2f3b7e699ef635e52d64cdacdab185666b6d
|