Search This Blog

Using a WiFi USB Adapter with the Raspberry Pi



I finally bought a USB WiFi adapter for my Raspberry Pi. It was so cheap and easy to set up that I definitely recommend it if you're thinking about getting one. I got the "Edimax EW-7811Un 150M 11n Wi-Fi USB Adapter" (which you can get on Amazon here).

I then edited /etc/network/interfaces to look like this:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0


iface wlan0 inet dhcp
        wpa-ssid "ssid"
        wpa-psk "password"


Where ssid is my router's identifier and then password is my password. Then I unplugged the ethernet cable from the Pi and rebooted. Boom, the Pi is free to roam about the house. I was a little worried about my AC adapter and the draw from these USB devices (WiFi, webcam, and USB drive) being too much, but it's running like a champ.

Raspberry Pi Uptime Wars

82 days of uptime on a Raspberry Pi, tracked with a cron job to SQLite database.

Since the Raspberry Pi uses very little electricity, it's easy to just leave on all the time. As my Pi was on for a while after I got it I realized it started to accumulate some pretty impressive uptime. At one point it had gone 82 days without shutting down or rebooting. Unfortunately, my house lost power due to a storm with heavy winds and my Pi started back at 0.

I'm at 47 days now and attempting to beat my record - there were a few experiments in between that caused some reboots. A friend had his Pi on for 101 days straight when he accidentally cut off its power. A good way to garner good uptime would be to get a UPS for your Pi. They're not too expensive on Amazon and would keep a Raspberry Pi going for nearly 2 hours without any outside power source. 


So what's your best uptime? Do you have a screenshot of it? Add it to the comments below. My Raspberry Pi's uptime is accessible on the web here: http://treddell.com/pi/. I'll also update this post if I beat my previous record.

Battery Backup for the Raspberry Pi



One of the coolest things about the Pi is the ability to leave it on all the time without worrying about your electricity bill. It uses very little power, but can still do so many different things 24 hours a day. The Pi is also very stable for a cheap computer when left alone. Mine is currently at 47 days of uptime (you can check my Pi's status here: http://treddell.com/pi/) and my friend's Pi was at 101 days at one point.

However, a brief flicker in your electrical source can bring your uptime crashing down to 0 days and interrupt whatever the Raspberry Pi was doing at the time. But you can check out this project to prevent this: Raspberry Pi Battery Backup.

This tutorial from Repair Hub unfortunately uses the backup as a quick way to gracefully shut down the Pi. I'm interested in a cheap solution to keep the Pi running until the power comes back on or the battery is depleted. This UPS System (uninterruptable power supply) looks like it would do the trick. It would run for about ~40 min at 10 W of output. A Model B Raspberry Pi is rated at using 3.5 W while idle. This means we could get 114 minutes on battery backup. Not too bad.

Raspberry Pi News, Week of May 1 2014



Hey there! I'm deciding what experiment to start next with my Raspberry Pi, but until then here are some cool things in the news that other people are doing with their Pi's:

Jasper, a Raspberry Pi-powered Jarvis



A couple of Princeton students have taken a Raspberry Pi and created a program that could be the predecessor to a full-blown Jarvis. The project pairs a microphone with a Raspberry Pi and their software to create a device that listens for "Jasper" and then reacts to what you say next. Pretty cool, huh?

The two students, Shubhro Saha and Charlie Marsh, even provide a guide on how to get Jasper up and running on your own Raspberry Pi: Jasper Documentation.

This looks like it could be the next step in my journey towards building a Jarvis a la Iron Man, so I'll likely be adding it to the things I do with my Raspberry Pi list. I think the text-to-speech voice/program they use for Jasper needs a little work, but otherwise this project seems pretty awesome. Maybe it can convince me to get that USB wireless adapter that I've been eyeing for my Raspberry Pi. Don't want to have to yell at Jasper from a different room...

I'll start setting it up on my Pi soon and document any hang ups along the way, so stay tuned!

You can check out the project page here: Jasper | Control everything with your voice.

Raspberry Pool: Solar-heated Pool Controlled by a Raspberry Pi


The wizards over at Wotton Pool have created a system that allows them to control the solar-heated system for the pool with a Raspberry Pi. The Pi tracks temperatures throughout the system to decide when to pump water heated by the sun. They've gotten pretty sophisticated about it and even set up a dashboard to give some data on what the Pi has accomplished. The system also is set up so that it can be controlled over the Internet and adjusted from anywhere.

Have you found an interesting example of a Raspberry Pi in action? Let us know in the comments or with our contact form!

source:
Raspberry Pool
The Science Bit (more details)

Installing BitTorrent Sync on a Raspberry Pi





I've been looking for a replacement for Dropbox for a while now. I've tried OwnCloud, but it seemed awefully slow on a normal machine, and especially slow on a Raspberry Pi. It seemed to heavy for the simple task of file syncing, anyway, with all of its features. I knew about BitTorrent Sync, but didn't know that there was an ARM version of the client for it. When I saw that there was, I decided to try it out on the Raspberry Pi. It works great and with the Pi always on it replaces Dropbox perfectly for my needs.

To install BitTorrent Sync on your Raspberry Pi download the ARM version  and transfer it to your Pi. Next, extract it and in the folder you will find the BitTorrent Sync binary called btsync. Following BitTorrent's instructions, simply run that binary by entering `./bstync` in your Raspberry Pi's terminal.

Next, you can visit /gui on port 8888 of your Pi. So if your Pi's IP address is 192.168.1.4, visit http://192.168.1.4:8888/gui to set up the folders you want to share.


BitTorrent Sync web interface
BitTorrent Sync web interface

Once you select a folder to sync on the Pi, you can generate a secret string for that folder. When you enter that string in the web interface for BitTorrent Sync running on another computer, it will start syncing files from that folder on your Pi. To get BitTorrent Sync for your other computer (Windows, Linux, or Mac) go to that same download page and download the client for your machine.

BitTorrent Sync is a great replacement for Dropbox or other similar file syncing software. You also get to control the computers that your files are on with BitTorrent Sync, and aren't vulnerable to anyone deleting an account and endangering your data.

If you have any questions just ask them in the comments below and I'll help you out.

Setting up Apache on a Raspberry Pi

I recently covered how to set up nginx on a Raspberry Pi and also how to use PHP with nginx on a Raspberry Pi. For those of you that would prefer to use Apache on your Pi, here is how you can get it set up and configured.
First, install Apache by entering this command into a terminal on or connected to the Raspberry Pi:
sudo apt-get install apache2
You can also check for other running web servers with this command:
ps -Alf | grep www
That shows lines like 00:00:00 nginx: worker process for my Pi, so I'm going to stop nginx (sudo /etc/init.d/nginx stop).
Now that Apache is installed, you can visit your Pi's local IP address to make sure it's working. Apache is automatically started, and when I visit 192.168.1.33 (my Pi's IP, found by using the ifconfig command) I see a page that says "It works!".
Next, you can edit that default page on your Pi by opening and editing /var/www/index.html. That's all there is to it, Apache is now installed and running on your Raspberrry Pi!