You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-2Lines changed: 37 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
After installation and configuration (see below) the Raspberry Pi serves a single page demonstration app at: `http://your_raspberry_pi_hostname:5000/`.
1
+
After following the installation and configuration steps below, your Raspberry Pi will serve a single page demonstration app at: `http://your_raspberry_pi_hostname:5000/`.
2
2
3
3
* Each pin defined as output will show up in the **controls** section with a button to toggle its state.
4
4
* Each pin with an input event displays a message in the **events** section each time it is triggered.
A config file `config/pins.yml` is used to define the initial setup for pins that will be accessible to the API. If a pin is not defined here it will not have a URL route in the API. For full documentation about available GPIO input pin configurations see the [documentation](http://sourceforge.net/p/raspberry-gpio-python/wiki/Examples/).
47
47
@@ -67,6 +67,17 @@ A config file `config/pins.yml` is used to define the initial setup for pins tha
67
67
* `event` - This can only be used in combination with a pin set to input mode (`mode: IN`). If defined, the pin will use a socket.io connection and push data to the client when an event is detected. Accepted values are: `RISING`, `FALLING`, `BOTH`.
68
68
* `bounce` - This can be used when an `event` is defined to prevent multiple callbacks being fired accidentally. The value is the number of milliseconds to wait before detecting another `event`.
69
69
70
+
##### Note:
71
+
72
+
An example configuration file is included in this project. It defines:
73
+
74
+
* **Pin 18** as an output pin
75
+
* **Pin 23** as an input pin registered with a RISING event.
76
+
77
+
Using this configuration, all you need to do is wire a 1K resistor and LED to **pin 18**, and an button to **pin 23** to start using the demonstration app immediately.
78
+
79
+

This project uses [Upstart](http://upstart.ubuntu.com/) to automatically start the GPIO web server when the Raspberry Pi boots. If you make changes to the server code in this project on your Raspberry Pi, you will need to restart the GPIO server in order for those changes to take affect. If you want to do this without rebooting, you can use the following command:
264
+
265
+
```
266
+
sudo service gpio-server restart
267
+
```
268
+
269
+
If for any reason you wish to stop the GPIO server from running you can use:
0 commit comments