Commits

Sebastian Bub committed 2bd3052

clarifications in readme

Comments (0)

Files changed (1)

 ## What is rpi-gpio-webapp?
 
 rpi-gpio-webapp is a lightweight java based web application to control your GPIO ports
-of your Raspberry Pi over http. It is based on documentation 
-http://elinux.org/Rpi_Low-level_peripherals#GPIO_Driving_Example_.28Shell_script.29
+of your Raspberry Pi over http. It is based on documentation at 
+[elinux.org: RPi Low-level peripherals](http://elinux.org/Rpi_Low-level_peripherals#GPIO_Driving_Example_.28Shell_script.29)
 
-It is tested with Winstone Servlet Container http://winstone.sourceforge.net/, but any
+It is tested with [Winstone Servlet Container](http://winstone.sourceforge.net/), but any
 other servlet engine will probably do, too.
 
 
 ### Features:
 
-* Every port can be set as input, output or analog input (requires a simple circuit based on [raspberrypi-spy.co.uk](http://www.raspberrypi-spy.co.uk/2012/08/reading-analogue-sensors-with-one-gpio-pin/)).
+* Every port can be set as input, output or analog input (requires a simple circuit based on [raspberrypi-spy.co.uk: Reading Analogue Sensors](http://www.raspberrypi-spy.co.uk/2012/08/reading-analogue-sensors-with-one-gpio-pin/)).
 * Output ports can be set conditionally on values of input ports (i.e. darknessSensor1in==1&lamp1out=1, see cron.conf).
 * You can give each port a custom name to make your client look better.
 * You can define a default state on output ports.
 * You can set a simulation mode for testing your client.
 * Setting multiple ports in one requests are set one after another, but the code
   is optimized and nothing unnecessary is done in between (it takes about 2-5ms on an idle Raspberry Pi to set all 17 ports, some artificial load (e.g.'find /' in the background) will slow it down to 10-15ms).
-* Cronjobs (exact to the second) for output ports (http://quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger). Output ports can be set conditionally and you have a simple but powerful semaphore mechanism.
+* Cronjobs (exact to the second) for output ports are based on [quartz-scheduler.org](http://quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger). Output ports can be set conditionally and you have a simple but powerful semaphore mechanism.
 
 ### Planned Features
 
-* More status information via web about configuration.
+* More status and configuration information requestable via json.
 
 ### Possible Unplaned Features
 
 
 5. Get the project `hg clone https://bitbucket.org/sbub/rpi-gpio-webapp`
 
-6. **Get Winstone Servlet Engine**: http://winstone.sourceforge.net/ and put the jar in the same directory as the start.sh
+6. **Get [Winstone Servlet Container at http://winstone.sourceforge.net/](http://winstone.sourceforge.net/)** and put the jar in the same directory as the start.sh.
 
-7. Build the project `mvn package` (It takes about 3-7 minutes to build on Raspberry Pi)
+7. Build the project `mvn package` (It takes about 3-7 minutes to build on Raspberry Pi).
 
 8. Check the location and name of WINSTONE_JAR in start.sh
 
-9. **Copy gpio.conf.MUST_BE_CHANGED** to gpio.conf and configure it
+9. **Copy gpio.conf.MUST_BE_CHANGED** to gpio.conf and configure it.
 
-10. Start the servlet container `sudo ./start.sh`. You may have to mark the script executable `chmod a+x start.sh stop.sh` first.
+10. Start the servlet container `sudo ./start.sh`. You may have to mark the scripts executable `chmod a+x start.sh stop.sh` first.
 
-11. Make a request, e.g. **http://raspberrypi:8080/handle?g0=1&g1=0**
+11. Make a request, e.g. **[http://raspberrypi:8080/handle?g0=1&g1=0](http://raspberrypi:8080/handle?g0=1&g1=0)**
 
     It will return {"g1":0,"g0":1} (and you may check the log).
     
 
 * Make sure you **disable simulate mode**.
 * Turn down logging after testing in log4j.properties (this is important for performance on your Raspberry Pi).
-* A simple init.d script is also provided in src/main/resources/init.d/gpio-winstone which can be installed with the follwing commands:
+* A simple init.d script is also provided in file src/main/resources/init.d/gpio-winstone which can be installed with the follwing commands:
 
 ```
 chmod a+x /home/pi/rpi-gpio-webapp/src/main/resources/init.d/gpio-winstone
 sudo update-rc.d gpio-winstone defaults 3 3
 ```
 
-    Do not forget that your GPIO ports may be operated by this process now!
+**Do not forget that your GPIO ports may be operated by this process now (even after reboot)!**
+
 
 ## Configuration and Logging and Debugging
 
-* To enable logging, check log4j.properties and start.sh.
-* For configuration, check gpio.conf, cron.conf and start.sh
+* To change logging check log4j.properties and start.sh.
+* For configuration check gpio.conf, cron.conf and start.sh
 
 ## Sampe Usage
 
 
 ### Analog INPUT
 
-A simple but powerful circuit can be found at [raspberrypi-spy.co.uk](http://www.raspberrypi-spy.co.uk/2012/08/reading-analogue-sensors-with-one-gpio-pin/) which makes analog inputs simple to read and handle in software.
+A simple but powerful circuit can be found at [raspberrypi-spy.co.uk: Reading Analogue Sensors](http://www.raspberrypi-spy.co.uk/2012/08/reading-analogue-sensors-with-one-gpio-pin/) which makes analog inputs simple to read and handle in software.
 
-**Please also read comments in gpio.conf about the internal processing.**
+**Please also read comments in gpio.conf about the exact internal processing.**
 
 Although it is an analog input port, you must explicitly start reading the value (IN) because it may be slow (and blocks your port and your http request). The last read value is saved internally and can be used afterwards with conditions (initial and error value is -1). Keep in mind that reading may be slow. With manual control, your response may be slow (since reading blocks the port). With automatic control, make sure that the read process has finished or you may check against a previous value.
 
 
 The order of digital input ports and analog input ports is respected, but mixing output ports and input ports will change the internal processing (output ports are grouped and come last. Conditions break the groups into subgroups), e.g.
 
-`out1=1&analogTI=IN&out2=1` is handled `analogTI=IN&out1=1&out2=1`
+* `out1=1&analogTI=IN&out2=1` is handled internally as `analogTI=IN&out1=1&out2=1`
 
-`out1=1&in1=IN&out2=1&analogTI=IN&out3=1` is handled `in1=IN&analogTI=IN&out1=1&out2=1&out3=1`
+* `out1=1&in1=IN&out2=1&analogTI=IN&out3=1` is handled  internally as `in1=IN&analogTI=IN&out1=1&out2=1&out3=1`
 
-`out1=1&in1==1&out2=1&analogTI=IN&out3=1` (given in1==1 is true) is handled `out1=1&in1==1&analogTI=IN&out2=1&out3=1`
+* `out1=1&in1==1&out2=1&analogTI=IN&out3=1` (given in1==1 is true) is handled  internally as `out1=1&in1==1&analogTI=IN&out2=1&out3=1`
 
 
 ## Copyright