Hardware Reference
In-Depth Information
To install it, start with a current image of Raspbian. Then, from the running instance
of Raspbian, download and install the WebIOPi code:
$ wget http://webiopi.googlecode.com/files/WebIOPi-0.6.0.tar.gz
$ tar xvzf WebIOPi-0.6.0.tar.gz
$ cd WebIOPi-0.6.0
$ sudo ./setup.sh
You might want to check the WebIOPi website to make sure that 0.6.0 is still the latest
version before proceeding. If it has been updated, adjust appropriately.
The setup script (
setup.sh
) will download and install the necessary WebIOPi depen-
dencies from the
apt-get
repositories in Raspbian, then build the code and install it
into the proper locations.
When this finishes, you'll have a WebIOPi service that you can run and access via a
web browser. To turn it on, run:
$ sudo /etc/init.d/webiopi start
You can then connect to it from within the Raspbian session by opening a web browser
and navigating to
http://localhost:8000/
.
If you want to connect to it from a remote
system, you can replace
localhost
with either the IP address or fully qualified host-
name of the Raspberry Pi. For login credentials, the user is
webiopi
and the password
is
raspberry
.
Once connected, you will be able to view a graphical representation of the Raspberry
Pi GPIO header (click on the “GPIO header” link), as shown in
Figure 6-1
. From this
page, you can swap the direction on the Input/Output pins (not on the power or
Ground pins, for what are hopefully obvious reasons).