Youba - Youpi back-end
======================

Author: AlphaK - http://www.alphak.net/
Version: 1.4 build 20110822
License : GNU GPL v3, see license.txt


Hardware prerequisites
======================

* A personal computer
* Youpi Robot
* Youpi parallel cable

For information about how to build the parallel cable, browse to my [web site][1] or download [Youpi official documentation][2].

[1]: http://www.alphak.net/news/tag/youpi/
[2]: http://www.alphak.net/news/wp-content/uploads/files/youpi-official-documentation-1.0.7z


Software prerequisites
======================

Install the following products:

* [Python 2.6.x][3]
* [portio][4] (Linux only, also needs package python-dev)
* [Inpout32.dll][5] (Windows only)

[3]: http://www.python.org/getit/
[4]: http://portio.inrim.it/
[5]: http://logix4u.net/Legacy_Ports/Parallel_Port/Inpout32.dll_for_Windows_98/2000/NT/XP.html

Ensure your parallel port is active in your BIOS, and your OS has correctly loaded drivers for it.

Ensure python is in your path.

Ensure the user has privileges to open and write to the parallel port (e.g. using portio, you must be root under Linux).

Modify settings.py to suit your needs.


How to start and stop
=====================

* GUI: Double click on youba.py
* Console: python youba.py
* Press Ctrl+C to stop


Usage
=====

The back-end opens a TCP socket and waits for instructions provided on this socket.
See instruction manual and other documents in the 'doc' folder for instruction detailed explanations.

I.E: to make base motor turn 5 degrees, one would send the following basic instruction:
0,R,D,5,1

So, suppose you have the backend installed on host 192.168.0.8 and listening to port 12080, you may use netcat, or any other program to send the previous instruction. Using a standard shell and netcat, it would look like the following:
echo '0,R,D,5,1' | nc 192.168.0.8 12080

Since version 1.4, the back-end is also able to receive commands sent by a web browser, on his web server port. There are three ways to send a command to the web server:

* Plain text output: http://<HOST>:<PORT>/<COMMAND>
* JSON output:       http://<HOST>:<PORT>/?command=<COMMAND>
* JSONP output:      http://<HOST>:<PORT>/?command=<COMMAND>&callback=<CALLBACK>


Troubleshooting
===============

See log file content.
Please adjust log level to 'debug' if asking for support.


Changelog
=========

* 1.4 - 20110822
	* Added web request support

* 1.3 - 20110815
	* Added slots for save/restore capabilities (see documentation)
	* Added absolute positioning support

* 1.2 - 20110810
	* Rotation bytes are now computed once for each instructionSet (unless Merge command is sent)
	* No rotation byte is sent during initialization phase
	* Added a specialAction to disable parallel port output
	* Improved regression test directory structure
	
* 1.1 - 20110808
	* Split logging of bytes sent to the robot in a separate file
	* Added regression test possibility
	
* 1.0 - 20110802
	* First release



**Note:** This document is written using Markdown syntax