Three tasks for building infrastructure
- Master the skills of
transferring files to Linux Instances by connecting your file browser to
your Google server — I think most people got this working
- Be sure you understand how to use the
AJAX
get()
and post()
— needed to retrieve
data from remote sensors. Open brackets
and create a project using get()
.
- Borrow, probably in pairs, a Raspberry Pi and connect to it using the
account
csci178
. Password will be provided.
-
Create your own account on the Raspberry Pi
by following the first part of the
Raspberry Pi Linux users documentation.
-
The easiest way to give
sudo
access to your account is to
use adduser to add the sudo
group to your account. Use the command
man adduser to see how this is done.
Four more tasks for making a web server
- Following the instructions of the
Setup a Raspberry Pi PHP web server,
install a web server on your Pi. Be sure to test it out.
You should skip the PHP, but be sure to do the
Permmission (sic) section, except the directory should be
/var/www/html rather than
/var/www. Oh, just go and and do both.
-
Also, add your own account to the
www-data
group
and log in and out.
-
Create a file index.txt in the
/var/www directory and see if you
can view it with with a URL similar to
http://uncacsci-pi-α.cs.unca.edu .
Try to copy one of your CSCI 178 projects to this directory.
I/O on the Pi
This requires a little reading.
The MagPi Magazine is
a great source of information about using the Raspberry Pi.
Take a look at the recent article
Simple Electronics with GPIO Zero.
Read the first three chapters:
“Getting Started with GPIO Zero,”
“Control LEDs,” and
“Add a Push Button.”
We will try to build it in class with a
Pi Cobbler.