Feb 27th 2014
Know How... 82
RasPi Web Server and Panning Timelapse
Cryptocurrencies wasted energy, a Raspberry Pi Web Server, and use an egg timer for time-lapsing.
Cryptocurrencies wasted energy, a Raspberry Pi Web Server, and use an egg timer for time-lapsing.
Check out our transcripts.
Segment One
Raspberry Pi Webcam Server
What You'll Need!
- Raspberry Pie
- SD card of 16GB or higher
- USB Keyboard
- USB Mouse
- HDMI Cable
- HDMI Monitor
- MicroUSB Power Adapter and Cable
- Ethernet cable and Internet connection
What You'll Do!
- Download all the files that you'll need for the project. (Formatting Tool & NOOBS) You'll find all files at the Raspberrypi.org Download Page
- Extract the files to your desktop
- Install the SDFormatter Software
- Format your SD card with the SDFormatter. Make sure to select the option to allow it to expand the volume.
- Copy ALL the contents of the extracted NOOBs folder onto the SD Card.
- Connect the Raspberry Pie - Plug the Mouse and Keyboard into the powered hub. Plug the Webcamera into and the bug into the two on-board USB ports. Connect the HDMI port to your monitor. Put the SD card into the card slot.
- Power! - Connect the power port of the RasPi to the powered hub.
- Install - You'll get a screen that lets you select which distro you want installed on your Pie. Select "Raspbian" and then click "install"
- Click "OK" and the RasPi will reboot into the configuration tool.
- Change your Password - Using the arrow keys, choose option #2 and change the default password. (Your username will be "pi" and your password will be whatever value you choose.)
- Set Language and Time Zone - Scroll down to option #4 "Internationalisation Options" and set the Pi to your language and time zones.
- Select "Finish" then hit ENTER
You'll now see the Raspbian command prompt which should look like this: "pi@raspberrypi ~$_"
You now need to update the list of available packages, install Apache, MySQL, PHP5, PEAR, and phpMyAdmin, then set the Apache Configuration.
Update Packages
sudo apt-get update
Install Apache
sudo apt-get install apache2
Install MySQL
sudo apt-get install mysql-server
- In the middle of the installation, you'll be asked to change the root password for the MySQL database.
Install PHP5 & PEAR
sudo apt-get install php5 php-pear php5-mysql
sudo service apache2 restart
Install phpMyAdmin
sudo apt-get install phpmyadmin
- It will ask you, halfway through the installation, which web server you want to use. Select Apache and then select "OK"
- It will also ask you to confirm that you want to use the MySQL database installation that you just completed. Give it the password that you selected and continue.
- Lastly, it will ask you what password you want to use for the phpMyAdmin page.
Set the Apache Configuration
sudo nano /etc/apache2/apache2.conf
Add the line:
Include /etc/phpmyadmin/apache.conf
Start the server
sudo service apache2 restart
Test It!
Type: ifconfig and you'll get a status screen that includes the "eth0" IP address. Type that address into your browser and you should see the "It Works!" screen.
If you append "/phpmyadmin/" to the IP address, you'll enter the phpMyAdmin page.
Add an FTP Server!
Take ownership of the web root by typing:
sudo chown –R pi /var/www
Install the vsftpd package by typing:
sudo apt-get install vsftpd
Edit the vsftpd configuration file by typing:
sudo nano /etc/vsftpd.conf
You need to make four changes to the configuration file:
- First, change "anonymous_enable=YES" to "anonymous_enable=No"
- Remove the comment, the pound sign, from "local_enable=YES" and "write_enable=YES"
- Go to the bottom of the file and add the line: "force_dot_files=YES"
Hit CTRL & X to save and exit.
Now start the FTP server by typing :
sudo service vsftpd restart
Finally, we're going to create a FTP shortcut. Type:
ln –s(space) /var/www/ (space) ~www
Segment Two
GoPro Egg Timer Timelapse
Parts List
- IKEA Ordning Kitchen Timer $12
- GoPro
- 1/4” to 3/8” Convert Screw Adapter
We’re breaking things so you don’t have to!
Step 1: Stick on the GoPro!
- Apply GoPro sticky mount to the top of the timer
- Be sure to have your Settings properly set up
- Still picture mode, set for 2 second shots.
- Twist the Timer!
Step 2: Make the Timer Tri-Pod Mountable
- Drill at 5/16 hole carefully
- Insert the screw adapter
- Be sure to not make the hole too big, so that you can't fit the screw adapter in the bottom case.
- I used a hammer to make sure the screw adapter was flush
Connect with us!
Don't forget to check out our large library of projects on this site. If you want to search for a topic, try this custom search engine.
- Tweet at us at @padresj and @Cranky_Hippo
- Email us at knowhow@twit.tv