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
Usage
from weallcode_robot import Robot
alpha = Robot('alpha')
# (left, right) wheels 100% forward
alpha.wheels(100, 100)
alpha.sleep(1)
# (left, right) wheels 100% backward
alpha.wheels(-100, -100)
alpha.sleep(1)
# spin around
alpha.wheels(100, -100)
alpha.sleep(1)
API
Method | Params | Values | Example |
---|---|---|---|
buzzer_off |
bot.buzzer_off() |
||
buzzer |
hertz , period |
1 to 1000 |
bot.buzzer(1000, 1000) |
led |
red , green , blue |
0 to 255 |
bot.led(0, 12, 255) |
sleep |
seconds |
number >= 0 | bot.sleep(1.5) |
stop |
bot.stop() |
||
wheels |
left , right |
-100 to 100 |
bot.wheels(-90, 80) |
Development
Requirements
- Docker
Install
make install
Run
Open the desired file in the demo
folder and specify a robot name.
make demo # Default demo
make demo march # Imperial Death March
make demo slow # 50% wheel speed
make demo spin # Spin around for 10 seconds
Publish
make publish
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.5.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for weallcode_robot-1.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02c0fc371ff415e637e0657612bed35564f7877634c63f3a6b7f283951e46095 |
|
MD5 | 26a9f2e80394a3feb943df6c34657f1b |
|
BLAKE2b-256 | 707f02a16c69b0957f1ef3cd36181bdd27514cdd1b957de0ea1cc20e1399c27e |