A starting package to work with smarthome robot
Project description
Smart Home Utils
A Python utility library for controlling and managing robot navigation in a smart home environment. This library provides sensor reading capabilities, movement controls, and debugging functions for robot navigation.
Features
- Sensor data reading and processing
- Robot movement control functions
- Compass and orientation management
- Distance sensor handling
- GPS position tracking
- Debug output functionality
- Support for both U14 and U19 robot configurations
Main Functions
Sensor Reading
-
readSensorsU14(): Reads sensor data for U14 configuration including:- Distance sensors (front, back, left, right, and diagonal positions)
- Compass orientation
- Room information and cleaning status
-
readSensorsU19(): Reads sensor data for U19 configuration including:- Distance sensors in 8 directions
- GPS position
- Battery status
- Compass orientation
Movement Control
move(left, right): Controls robot movement by setting wheel velocitiesturn(deg): Rotates the robot to a specific compass degreecompassCorrection(alpha): Ensures compass values stay within 0-360 degree range
Debug Functions
debugU14(): Displays detailed sensor information for U14 configurationdebugU19(): Displays detailed sensor information for U19 configuration including:- Battery status
- Distance readings
- GPS coordinates
- Compass heading
- Time
Dependencies
controller: Robot control interfacejson: For data parsing
Hardware Requirements
The library is designed to work with robots equipped with:
- 8 distance sensors (D1-D8)
- GPS sensor
- Inertial measurement unit
- Two wheel motors
- Communication devices (emitter and receiver)
Usage
Import the utility module and use its functions to control the robot and read sensor data:
from smarthome_utils import move, turn, readSensorsU14, debugU14
# Read sensor data
readSensorsU14()
# Move the robot
move(5, 5) # Move forward
turn(90) # Turn to 90 degrees
# Debug output
debugU14()
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
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 smarthome_utils-0.0.1.tar.gz.
File metadata
- Download URL: smarthome_utils-0.0.1.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c456cb80957f9b6772bb578ae2c2e411c94a34666988db97fff3faf14e67d446
|
|
| MD5 |
9c90f832619211fa497a2c40f5ac1d64
|
|
| BLAKE2b-256 |
90f1503243dfd466f4072f81f174650a0fe964dd3fdd4d652c09210414c3d51b
|
File details
Details for the file smarthome_utils-0.0.1-py3-none-any.whl.
File metadata
- Download URL: smarthome_utils-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0033de86c21cd9e1ac18e28e9f4ec9a5a58f0fe8725152c9219865124b7df706
|
|
| MD5 |
514d7f44534fd380917ec6f90f378df0
|
|
| BLAKE2b-256 |
78afa1c39e7c82653fa06927f327bb715439c9453100e1eee31daea7b63d4eeb
|