servos! In case you are wondering why I didn’t use an
analog IR range sensor, it’s because I wanted to avoid
having to add an analog-to-digital converter at this point —
my overall goal for SPRITE was simplicity.
I also decided against using whiskers (bump sensors).
Robots are kid magnets, and very young children might
manage to injure themselves by getting poked by the
Setting up your Raspberry Pi
Step 1: Let's get your Raspberry Pi running.
There is a great Quick Start Guide at www.raspberrypi.org/
If you follow that guide, choose to install Raspbian as your OS
Step 2: Install a text editor you are used to (if you like Nano
or Vi, you can skip this step).
What I don't like is the included Nano editor. I am old school,
and I still have the pre-historic Wordstar control keys hard-wired in
my brain. Joe is a good simple text editor I’m used to.
In this article, when you see:
Type "insert text here"
then you should enter the indicated text on the Pi console (or
terminal or SSH session) and press return.
Type "sudo apt-get install joe"
Step 3: Select a good Wi-Fi adapter for your Pi.
This is critical. There is a good list of adapters known to work
I strongly recommend that you choose an adapter that does
not require a powered hub or compiling kernel modules. Spending
a few extra bucks on the adapter can save you hours of work.
Of the adapters I have in my lab, I like the Nets WF-2111s
best as they work without a powered hub. If you plug it in when
the Pi is already running, it will likely reboot your Pi but will work
fine after that. My suggestion is plug it into the Pi before
Step 4: Set up the Wi-Fi.
A good tutorial on setting up Wi-Fi on your Pi can be found at
Step 5: Name your Pi.
Since I have multiple Pis, I give each one a different
Edit /etc/hosts to change the host name in it:
Type "sudo joe /etc/hosts"
Change the line that reads:
Next change /etc/hostname to reflect the new name:
Type "sudo joe /etc/hostname"
Change 'raspberrypi' to 'mypiname'
Then, execute the hostname.sh system script:
Type "sudo /etc/init.d/ hostname.sh"
Type "sudo reboot"
You can find a more verbose version of how to change your
hostname at www.howtogeek.com/167195/how-to-change-
I ended up having to make a few more changes to get
everything working right, so I suggest you modify your
/etc/wpa_supplicant/ wpa_supplicant.conf to match.
Here is my /etc/network/interfaces file:
iface lo inet loopback
iface eth0 inet dhcp
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/ wpa_supplicant.conf
iface default inet dhcp
Here is my /etc/wpa_supplicant/ wpa_supplicant.conf file (set
up for WAP2 encryption):
If it doesn’t work, you likely have a password or encryption
mis-match. If SSH is not enough for you, you can install XRDP by
running the following command:
Type "sudo apt-get install xrdp"
There are SSH and RDP clients for all phones, tablets, and
You can find your Pi's IP address by looking on your router’s
"Attached Devices" screen if it has one, or by connecting a
keyboard and monitor to your Pi. If all else fails, you can assign
your Pi a static IP address.
Enjoy your Wi-Fi connection!
60 SERVO 01.2014