Skip to main content

We All Code Robot Client

Project description

We All Code Robot Client

standard-readme compliant

The Python client code for the We All Code robots.

Table of Contents

Requirements

  • Python >= 2.7

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:8000 then you may need to restart it:

sudo avahi-daemon -D

Usage

from weallcode_robot import Robot
import time

alpha = Robot('alpha')

# (left, right) wheels 100% forward
alpha.wheels(100, 100)
time.sleep(1)

# (left, right) wheels 100% backward
alpha.wheels(-100, -100)
time.sleep(1)

# spin around
alpha.wheels(100, -100)
time.sleep(1)

alpha.stop()

API

Method Params Values Example
wheels left, right -100 to 100 bot.wheels(-90, 80)
stop bot.stop()
led_on bot.led_on()
led_off bot.led_off()
led_rgb red, green, blue 0 to 255 bot.led_rgb(0, 12, 255)
buzzer_on bot.buzzer_on()
buzzer_off bot.buzzer_off()

Maintainers

@danielmconrad

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2019 We All Code

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

weallcode_robot-1.0.1.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

weallcode_robot-1.0.1-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

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