How to install - hgdeoro/py-arduino-proxy GitHub Wiki
PyArduinoProxy now is py-arduino
PyArduinoProxy now is py-arduino
I've renamed the project to py-arduino, please check it out at:
https://github.com/hgdeoro/py-arduino
I didn't like the 'proxy' word in its name, and made big changes, including:
- refactored
low level
code to the newpy_arduino
package - refactores
web application stuff
topy_arduino_web
package - add multiprocess support + background tasks, aka: concurrent access (thanks to uWSGI + PyRO)
- labeling of pins and restricted acces from web (administrable using Django)
- cleaned up old code (like old examples) and an updated README
Old content
How to install
Wiki home | Git repo | How-to-install | Web-Interface | Blog (spanish) | Site (spanish)
Overview
- Step 1 - Requirements
- Step 2 - Install in Linux
- Step 3 - Compile the sketch and upload to the Arduino
- Step 4 - Test it
Step 1 - Requirements
Py-Arduino-Proxy uses PySerial for communicating to the Arduino. On Ubuntu/Debian, you can install it with:
$ sudo apt-get install python-serial
Or you can download it from the project's page: PySerial downloads.
Step 2 - Install in Linux
You can download and install Py-Arduino-Proxy in Linux (tested on Ubuntu) either using git or downloading a .tar.gz from GitHub.
- use git if you are a developer and want to hack it (see below).
- download the .tar.gz from https://github.com/hgdeoro/py-arduino-proxy/tarball/master otherwise (see below).
How to install in Linux (using git)
Clone the GIT repository in your home directory:
$ cd ~
$ git clone git://github.com/hgdeoro/py-arduino-proxy.git
The previous command will create the ~/py-arduino-proxy directory.
Note: If you don't have git installed, you can install it with apt-get on Ubuntu/Debian:
$ sudo apt-get install git-core
How to install in Linux (from .tar.gz)
Download the latest version using wget:
$ cd ~
$ wget --no-check-certificate -O py-arduino-proxy.tar.gz https://github.com/hgdeoro/py-arduino-proxy/tarball/master
If you want to download from your browser, use this link: https://github.com/hgdeoro/py-arduino-proxy/tarball/master.
Uncompress the .tar.gz:
$ tar xzf py-arduino-proxy-latest.tar.gz
This will create a directory named 'hgdeoro-py-arduino-proxy-XXXXXXXX'. Rename it to 'xxx':
$ mv hgdeoro-py-arduino-proxy-XXXXXXXX py-arduino-proxy
Step 3 - Compile the sketch and upload to the Arduino
The sketch will be located in ~/py-arduino-proxy/pde/py_arduino_proxy/py_arduino_proxy.pde
You only need to open it with the Arduino IDE, compile and upload.
Step 4 - Test it
Go to the project directory:
$ cd ~/py-arduino-proxy
Run the 'ping' program (to stop, press Ctrl+C):
$ ./bin/ping.py /dev/ttyACM0
Warning: waiting some seconds to let the Arduino reset...
Ping sent... OK - Time=27.387 ms
Ping sent... OK - Time=21.267 ms
Ping sent... OK - Time=27.626 ms
^C
- Linux: after connecting the Arduino, the serial device is created automatically (tested on Ubuntu), usually on /dev/ttyACM0.
- Win: use COM3 as serial device.