Skip to content

Commit

Permalink
README-ing about led blinking
Browse files Browse the repository at this point in the history
  • Loading branch information
ronanguilloux committed Dec 16, 2012
1 parent a6ca5a7 commit 027c1af
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
resources/
resources/sqlite
resources/log
web/js/data.js
vendor/
composer.lock
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ It's based on the [php-gpio](https://github.com/ronanguilloux/php-gpio) PHP libr
Installation (hardware)
-----------------------

First, install the DS18B20 on your bread board, wired to the #4 gpio pin:

![DS18B20 sensor connection](http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/temperature/sensor-connection.png)

See this very easy-reading [tutorial](http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/temperature) on the Cambridge University CompSci Laboratory Raspberry Pi dedicated pages.

Then add a led & a resistor & wired it to the #17 gpio pin.


Installation (software)
-----------------------
Expand All @@ -40,6 +44,26 @@ $ wget http://getcomposer.org/composer.phar
$ php composer.phar install
```

Then allow your raspberry pi to blink the #17 gpio pin wired LED without sudo.

First, add a symlink to the blinker (see ronanguilloux/php-gpio)

$ ln -s vendor/ronanguilloux/php-gpio/blinker.php blinker.php

Then allow the blinker to be run without sudo. Edit your `/etc/sudoers` file:

``` bash
$ sudo visudo
```

Add this two lines in your `/etc/sudoers` file : (replace MyLinuxUser with your login name)
This will allow you and Apache2 to run the blinker without `sudo`

``` bash
MyLinuxUser ALL=NOPASSWD: /path/to/blinker.php
www-data ALL=NOPASSWD: /path/to/blinker.php
```


Set up the sensor
-----------------
Expand Down
Binary file added resources/images/led-resistor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 027c1af

Please sign in to comment.