We All Code Robot Client
Project description
We All Code Robot Client
The Python client code for the We All Code robots.
Table of Contents
Requirements
- Python >= 3
Install
On Ubuntu-like systems:
sudo apt-get install python3-pip -y
pip3 install weallcode_robot
The avahi daemon should already be running, but if a robot is not reachable at http://<robotname>.local
then you may need to restart it:
sudo avahi-daemon -D
Usage
from weallcode_robot import Robot
from time import sleep
alpha = Robot('alpha')
# (left, right) wheels 100% forward
alpha.wheels(100, 100)
sleep(1)
# (left, right) wheels 100% backward
alpha.wheels(-100, -100)
sleep(1)
# spin around
alpha.wheels(100, -100)
sleep(1)
alpha.stop()
API
Method | Params | Values | Example |
---|---|---|---|
wheels |
left , right |
-100 to 100 |
bot.wheels(-90, 80) |
stop |
bot.stop() |
||
led |
red , green , blue |
0 to 255 |
bot.led(0, 12, 255) |
buzzer |
hertz , period |
1 to 1000 |
bot.buzzer(1000, 1000) |
buzzer_off |
bot.buzzer_off() |
Maintainers
Contributing
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
License
MIT © 2019 We All Code
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
weallcode_robot-1.1.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for weallcode_robot-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6a9f61f9ab458563a4397333a3b8c5c5f85e49cc74976cfdb73e95a15de8aa4 |
|
MD5 | abe7cd589cf483412c06d25c528f7bdc |
|
BLAKE2b-256 | 58e0375305cf7a7e90f3818ff03cfcb23b1d1c4ada829230ff049c5d4318afc1 |