pyelixys is a library for communicating with the Sofie Biosciences Elixys hardware. The the hardware is a design based upon the mbed development board. It communicates with the hardware using the websocket protocol. This library abstracts the hardware to python objects.
First, install pip, python-dev, and mysqlclient.
sudo apt-get install python-setuptools
sudo apt-get install python-dev
sudo apt-get install libmysqlclient-dev
Next, install the virtual environment - virtualenv.
pip install virtualenv
Now setup the pyelixys sandbox environment
virtualenv pyelixys
cd pyelixys
Active the sandbox environment
source bin/activate
Clone the repository
git clone git@github.com:henryeherman/pyelixys.git
cd pyelixys
Install the python dependencies using pip
pip install -r requirements.txt
If installing on linux, you will need numpy. To install numpy in a virtualenv requires the python dev package. Before installing the requirements with pip run the following command.
sudo apt-get install python2.7-dev
To run the Elixys host server and gain access
to system object, which gives access to all
features the Elixys Robot, run the following
command from the root of the virtual environment.
The system object will be loaded as the variable
s
.
python -m pyelixys.hal.system
To run the Elixys hardware simulator, run this command from the root of the Elixys virtual environment.
python -m pyelixys.hal.tests.testelixyshw
The hardware simulator object and all corresponding
status information is accessible from the variable
e
.
To run the Elixys web server, perform the following command in the root of the virtual environment. The runserver shall run on port 80 and requires sudo permissions to execute.
sudo python runserver.py
The webserver shall handle all web requests to and
from the Elixys server. To access the webserver, open
a browser and visit the URL: localhost
. You will be
required to enter your creditionals.
Examples of URLs to visit include:
localhost/state
localhost/config
localhost/runstate