Added LED control button to test GUI
Merge pull request #40 from jtanx/master

Various updates
Fix ADC sampling

- Fixed ADC_Read function
- The path to the ADC data files is generally different (hooray)
- Modified run.sh to work it out and pass to the program
  - run.sh also loads kernel modules, etc
Merge branch 'master' of github:/szmoore/MCTX3420
Automatic commit of irc logs
Merge pull request #41 from jtanx/master

Update gui
Merge branch 'master' of https://github.com/szmoore/MCTX3420

There's always a merge.
Automatic commit of irc logs
Added restart functionality to run.sh

Essentially if there is a non zero (error) exit, it will restart the program.
If it gets a massive number of fatal errors it will eventually give up.

We should do something similar to this.
Perhaps receive a certain number of fatal errors in a time interval to give up?

Perhaps make the software not have Fatal errors :P

Making sure cleanup code is called might be important.

Also we really need the errors to show up in the GUI.

Anyway, this is useful for now because it lets me do things like this:
http://192.168.1.10/api/pin?type=gpo&num=13

To find the non working pins (eg: GPIO13) without restarting the server a billion times.
Added module for direct control over pins

Will hopefully be useful for testing purposes.

Usage:

1. GPIO Set
http://192.168.1.10/api/pin?type=gpo&set=S&num=N
 - S is 0 or 1 and N is the pin number (1 to 96)

2. GPIO Read
http://192.168.1.10/api/pin?type=gpi&num=N
 - N is pin number

3. ADC Read
http://192.168.1.10/api/pin?type=adc&num=N
 - N is pin number (0 to 7)

4. PWM Set
http://192.168.1.10/api/pin?type=pwm&num=N&set=1&freq=F&duty=D&pol=P
 - F in Hz, D as a multiplier (0 -> 1) P is 0 or 1
 - N is pin number (0 to 7)

5. PWM Stop
http://192.168.1.10/api/pin?type=pwm&num=N&set=0

Pin numbering according to http://beagleboard.org/static/images/cape-headers-pwm.png

PWM pins are numbered as: EHRPWM0A = 0, EHRPWM0B = 1, EHRPWM1A = 2, etc

Module code in pin_test.c and pin_test.h.
Uses functions declared in bbb_pin.h and implemented in bbb_pin.c

Note:
 - Also modified bbb_pin.c functions to not throw Fatal errors
   - Might want to change that back. It seemed like a good idea at 2am.

BUG ALERT:
 - Doing the following:
   http://192.168.1.10/api/pin?type=gpo&num=13&set=0
   Will give a FCGIRejectJSON (invalid Pin number).
Merge branch 'master' of https://github.com/szmoore/MCTX3420

Always with the merge.
Merge pull request #42 from jtanx/master

Update fastcgi bool type
Automatic commit of irc logs
Semi fix for pwm