Interface for the Alphabot sensors and camera
Project description
Version: 0.1.2
Author: @sadra-hub
License: MIT
Python Version: 3.8+
Description
alphabot-interface provides a modular and simple Python interface for interacting with key components of the Waveshare AlphaBot 2 platform, including:
- Camera module (using Picamera2)
- Battery monitoring
- Motor control
alphabot-interface is a lightweight Python package that lets you comfortably use various components of the AlphaBot platform and write clean, readable, and modular code.
This package is designed to abstract hardware-level interactions so developers and students can focus on high-level robotics programming and deply swarm intelligence algorithms
Installation
You can install the package via pip:
pip install alphabot-interface
Usage
This package let you comfortably use various components of AlphaBot and write clean, readable code.
from alphabot_interface import Camera, Battery, Motor
# Initialize components
camera = Camera()
battery = Battery()
motor = Motor()
target_x = 100
target_y = 0
DURATION = 3 #in seconds
# Use the motor to go to position (100,0) in 3 seconds
motor.move(target_x, target_y, DURATION)
# How much battery is left?
battery_status = battery.get_status()
# Take a photo with camera and save it to output.jpg
camera.take_picture("output.jpg")
# What do we see?
# returns a list of {id [target or obstacle], distance, left_angle, right_angle}
camera.get_objects()
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 alphabot_interface-0.2.5.tar.gz.
File metadata
- Download URL: alphabot_interface-0.2.5.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1c264e0800cca75a5a77a1d71d0f2da1190aa030031dfbef9fb3cc646848302
|
|
| MD5 |
8d7274eddba736253f6b80429b0d2f00
|
|
| BLAKE2b-256 |
113a24b3d23e1de33ea486bce6be4536bfd901e638a9b28d410dacc809740678
|
File details
Details for the file alphabot_interface-0.2.5-py3-none-any.whl.
File metadata
- Download URL: alphabot_interface-0.2.5-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d21abc3019e983fe06c5ad691e479aa1413534659533f4af766dcaf11a25eb89
|
|
| MD5 |
a08bf5409cd2392f131a5c90a7a568d0
|
|
| BLAKE2b-256 |
f76b5153dba3befa2e04546aafe4ffba851a54b7fe223a951dae82dc3797b655
|