Skip to main content

Interface for the Alphabot sensors and camera

Project description

AlphaBot

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alphabot_interface-0.2.2.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alphabot_interface-0.2.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file alphabot_interface-0.2.2.tar.gz.

File metadata

  • Download URL: alphabot_interface-0.2.2.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for alphabot_interface-0.2.2.tar.gz
Algorithm Hash digest
SHA256 ad1a834a214c6645f35be6e9d30f62433c4a2db90bc4530915eb416ced4fcd00
MD5 8a7d9390a1e23b1d1a5d91258cdb575a
BLAKE2b-256 44a82695e49002de9114936f9d96979cbfcaf19197683f6b477dc5ba83b5ee7f

See more details on using hashes here.

File details

Details for the file alphabot_interface-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for alphabot_interface-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 09a3faf7e854db0dc1130dbc20efd69d5545690318658570796e1e42ca766ef5
MD5 eda51f654a3bd30736f6f53af5315901
BLAKE2b-256 b3fbbfd705167a4f62b819c120f79d640aac2d986a46d97335204f42995694c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page