Python framework for robotics and physical computing.
Project description
Zorg is a Python framework for robotics and physical computing. It is based on Cylon.js, a JavaScript framework for robotics.
Getting started
Installation
All you need to get Zorg up and running is the zorg package:
pip install zorg
You may need to `copy the source <https://github.com/gunthercox/zorg/archive/master.zip>`__ if your device does not support `pip <https://pip.pypa.io/en/stable/>`__.
You should also install the packages for the hardware you are looking to support. In our examples, we will be using the Intel Edison and an LED, so we need the edison and gpio packages:
pip install zorg-gpio zorg-edison
Examples
Intel Edison and an LED
This example controls an LED connected to the Intel Edison and blinks it once every 500 milliseconds. This program should be run on the Intel Edison itself.
import zorg
def work (my):
while True:
# Toggle the LED
my.led.toggle()
# Wait 100ms before doing it again
time.sleep(0.1)
robot = zorg.robot({
"connections": {
"edison": {
"adaptor": "zorg_edison.Edison",
},
},
"devices": {
"led": {
"connection": "edison",
"driver": "zorg_gpio.Led",
"pin": 13, # 13 is the on-board LED
}
},
"name": "example", # Give your robot a unique name
"work": work, # The method (on the main level) where the work will be done
})
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
File details
Details for the file zorg-0.0.5.tar.gz
.
File metadata
- Download URL: zorg-0.0.5.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f6b74ac6661d72ea78b4357c5a4b24c163139057abd9ad0896a5d62f27f82a3 |
|
MD5 | c7265324fda41260696818b8b1c7a5fa |
|
BLAKE2b-256 | b9289a329ca950f9d75b0c4275dc83a90141cb5f290cf88da55be8c17637dd84 |
File details
Details for the file zorg-0.0.5-py2-none-any.whl
.
File metadata
- Download URL: zorg-0.0.5-py2-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5da3f0c461dc3695e89b8a48df3c2f96d55425e38c38736b1fe8a5c30345eed4 |
|
MD5 | 0803566bce1d0700c285ab192725e148 |
|
BLAKE2b-256 | 6ab8e9976a10b59fba7b2a5035306278696f166f6d80125fe8c19268598af2b9 |