Search This Blog

Changing the user password on a Raspberry Pi

To change your password on a Raspberry Pi, use the passwd command:

robert@rpi $ passwd
Changing password for robert.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 

passwd: password updated successfully

You will be asked for your current password, then to enter your new password twice to make sure you don't make a mistake.

Raspberry Pi News, Week of May 15 2015

Raspberry Pi News, Week of February 1 2015




Here is some additional Raspberry Pi action elsewhere on the internet, for those of you that can't get enough this week.

Raspberry Pi 2: 6x Faster than Original, Will Run Windows 10







Raspberry Pi 2
Raspberry Pi 2

The Raspberry Pi Foundation announced that the successor to the original Pi is now on sale. You can order the Raspberry Pi 2 right now for $35, the same price as the original Pi. Even though it doesn't cost more, the new Pi packs much more power and new features compared to the original, which came out in February of 2012. Now, three years later, the Pi Foundation has released a credit-card sized machine with 6 times the power of the original. It packs a 900 MHz quad-core ARM Cortex-A7 and 1GB of LPDDR2 SDRAM. That's twice the memory of the original Pi.

And since this is an ARMv7 processor (opposed to the previous ARMv6), it can run many more operating systems, including Windows 10. Microsoft has even announced that there will be a free version of Windows 10 for the Raspberry Pi 2. The founder of the Raspberry Pi Foundation even said "I think it's a usable PC now". I've been using my original for a while now :). Joking aside, he meant that you could even use the Pi as a general-purpose computer, whereas the past models were better of used for small programming experiments or headless utility machines.

If you're worried about your original Raspberry Pi becoming obsolete, you can rest assured. The Raspberry Pi Foundation has said that they will continue to produce Model A, Model B, and Model B+.

Here's a link to the store if you're looking to pick up one the new Pi's: Raspberry Pi 2.

Keeping your Raspberry Pi Up to Date

TL;DR: Run these two commands to keep your Pi up to date (for Debian/Raspbian derivatives):

sudo apt-get update
sudo apt-get dist-upgrade

Keeping the software on your Raspberry Pi updated to the current versions is very important. This will help protect your from security vulnerabilities and keep the Pi running better in general. It seems every week developers are finding security holes in well-known programs, some even revealing weaknesses that have been present for months or years. OSS (open source software) developers also strive to improve program efficiency and make things work better and faster with new versions. So it will benefit you to run the update commands shown above on a regular basis for your Raspberry Pi.

I run them every weekend as part of my data backup routine. After running them, you might want to reboot your Raspberry Pi, especially if you see that a new Linux kernel has been installed.

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.