Raspberry Pi Tutorial 2

Raspberry Pi Tutorial 2
Raspberry Pi Tutorial 2
Date: 2/20/2014
Demonstrations:
1. John Mosser will demonstrate a motion sensor using a Raspberry Pi.
2. Alain Tschanz will demonstrate how to access and monitor your
Raspberry Pi from anywhere in the world via the Internet.
Tutorial 2:
The second Raspberry Pi tutorial will cover the recommended
Raspberry Pi operating system called “Raspbian.” We will learn how to
update the RasberryPi firmware, the operating system and how to
install additional software from an external software repository.
Raspberry Pi Motion Sensor
• Tutorial is available at: http://learn.adafruit.com/downloads/pdf/pirpassive-infrared-proximity-motion-sensor.pdf
Remote Access to Raspberry Pi
Method 1: SSH (Secure Connection)
Requirements:
- Home router configured to accept SSH traffic
- Raspberry Pi: SSH enabled
- Know your router’s Internet IP address (To find your routers
Internet IP address, go to http://ip-lookup.net/)
- Have SSH client installed (for ex. Putty) on computer
- Command to run:
[email protected] $ > ssh <username>@<host>
For example: > ssh [email protected]
Remote Access to Raspberry Pi, cont.
Command line interface:
Remote Access to Raspberry Pi, cont.
Method 2: RaspCTL is an
application that lets you
control you Raspberry
Pi through a web
interface.
URL: http://raspctl.com/
To access your Raspberry Pi,
go to:
http://raspberrypi-ip-address:8086
(8086 is the default port)
Remote Monitoring Raspberry Pi
Method 1: Rpi-Monitor
Access your Raspberry Pi via a
web browser or a phone*:
http://raspberrypi-ip-address:8888
(default port)
*You must have a QR Code Reader
installed.
Remote Monitoring Raspberry Pi, cont.
Method 2: PhpSysInfo
URL: http://raspberrypi-ip-address/phpsysinfo
Remote Monitoring Raspberry Pi, cont.
Method 3: PSIAndroid
PSIAndroid is an Android phpSysInfo client
Source: https://github.com/rk4an/psiandroid
Features:
- Operating System Information (Version, Uptime, ...)
- CPU, Memory and Disk usage
- Multi-host
- HTTPS
- Basic/Digest Authentication
- Temperatures (Motherboard and IPMI)
- Fans speed (Motherboard)
- Network informations
- PSStatus
- SMART
- RAID
- UPS
- UpdateNotifier
- Printers (SNMP)
- Other plugins (coming soon)
Remote Monitoring Raspberry Pi, cont.
Method 4:
Raspcontrol
URL: http://raspberrypi-ipaddress/raspcontrol
Upgrade Raspberry Pi Firmware
• [email protected] $ > sudo apt-get install rpi-update
Or
[email protected] $ > wget http://goo.gl/1BOfJ -O /usr/bin/rpiupdate && sudo chmod +x /usr/bin/rpi-update
Note: If wget is not installed run the following command:
[email protected] $ > sudo apt-get install wget
Update and Upgrade Raspbian
Step 1: Update the repositories
[email protected] $ > sudo apt-get update
Step 2: Upgrade the packages
[email protected] $ > sudo apt-get upgrade
Installing and Uninstalling Software
Step 1: Search for the package
[email protected] $ > sudo apt-cache search xeyes
Step 2: Install a package
[email protected] $ > sudo apt-get install tuxeyes
To verify installation, run this command: [email protected] $ > tuxeyes
Step 3: Uninistall a package
[email protected] $ > sudo apt-get remove tuxeyes
To verify removal of software, run this command: [email protected] $ > tuxeyes
Basic Command line Commands
•
•
•
•
•
•
•
•
•
•
•
•
•
•
sudo (allows a permitted user to execute a command as superuser)
ls (ls -l, ls -al, ls -ah)
cd (cd ../, cd /, cd /home)
man (man apt-get)
cp (copy)
mv (move)
rm (remove)
mkdir (create directory)
rmdir (remove directory)
whomai (display current user name)
date (display current date)
hostname (display current host name)
exit (exit terminal window)
du (du -h)
Poll: What should the next
RaspberryPi Demonstration be?
•
•
•
•
•
•
Raspberry Pi Camera
Home Theater (Raspbmc)
Scratch programming
Temperature Sensor
Raspberry Pi as a Tor Router and Web Filter
Connecting to an Arduino
PhpSysInfo Installation
[email protected] $ > sudo apt-get install apache2 php5 libapache2-mod-php5
[email protected] $ > cd /var/www
[email protected] $ > sudo git clone https://github.com/rk4an/phpsysinfo.git
[email protected] $ > sudo chown -R www-data phpsysinfo/
[email protected] $ > cd /var/www/phpsysinfo
[email protected] $ > cp phpsysinfo.ini.new phpsysinfo.ini
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement