-
Notifications
You must be signed in to change notification settings - Fork 0
Home
-
Write raspbian-jessie image to microsdcard using Win32DiskImager
-
Turn on pi while physically connected over ethernet to a router
-
Log in to the router to find the LAN ip.
-
ssh to the pi from laptop using that LAN ip. id=pi, password=raspberry. Windows users download and use putty for this.
-
Configure wireless access vi:
nano /etc/wpa_supplicant/wpa_supplicant.conf
Add something like:
network={
ssid="<wifi id>"
psk="<wifi password>"
id_str="home"
}
network={
ssid="NCA Students"
key_mgmt=NONE
id_str="school"
}
-
Refresh all the libraries on the system. Just needs to be done 1x at startup.
sudo apt-get update sudo apt-get upgrade (this takes a while!)
pi@raspberrypi:~ $ sudo apt-get install apache2
http://modwsgi.readthedocs.io/en/develop/user-guides/quick-configuration-guide.html
pi@raspberrypi:~ sudo apt-get install -y libapache2-mod-wsgi
pi@raspberrypi:~ sudo nano /etc/apache2/apache2.conf
Add this line to the end of that file:
WSGIScriptAlias /myapp /var/www/wsgi/myapp.wsgi
pi@raspberrypi:~ sudo mkdir /var/www/wsgi
pi@raspberrypi:~ sudo service apache2 restart
https://www.raspberrypi.org/blog/gpio-zero-a-friendly-python-api-for-physical-computing/
Get & install it from this link (Download): http://abyz.co.uk/rpi/pigpio/python.html
To run now: sudo pigpiod
To have run on boot: sudo systemctl enable pigpiod
or better
sudo systemctl enable pigpiod
From the pi, install git (if you don't already have it) and download the scripts here via:
git clone https://github.com/jonathanhhb/EngineeringClub.git
(This copies my code to your local system.)
Follow the instructions here: http://www.raspberrypi-spy.co.uk/2012/07/16x2-lcd-module-control-using-python/
That works.
Now copy the "init_script" instructions from this page:
https://learn.adafruit.com/drive-a-16x2-lcd-directly-with-a-raspberry-pi/init-script
(copy that code, do the 'chmod', and the line below). This makes it so your Pi displays the IP address on the LCD at boot.
Copy the led_switch.py file to /var/www/wsgi/
sudo cp led_switch.py /var/www/wsgi/myapp.wsgi
Give it execute permissions
cd /var/www/wsgi
sudo chmod +x myapp.wsgi
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using-a-servo-motor/software