16 SERVO 11.2012
Step 1: Set up a private router network.
Let me walk you through futzing with a Linksys
router to get set up for this project. First off, you
can skip this first step if you only have one wireless
router and aren’t creating your own private robot
network. If you are like me, read on.
Plug your laptop’s CAT5 cable directly into Slot
1, NOT the Internet jack on the router. Now, go to
your router’s admin pages — typically at 192.168.1.1
— and log in as (typically) admin, with the password
“admin.” Navigate to the Setup tab and the Basic
Setup sub-tab (Figure 5).
Change your IP Address to something you like;
I chose 126.96.36.199. Name your router if you wish
(why not?). You will want the DHCP server to be
enabled; that is what our UNO32 is going to use.
Save your changes and reboot (power cycle) your
router. You may need to unplug and re-plug in your
CAT5 connection to the laptop.
Step 2: Configure your wireless settings and
Now, you need wireless to be set up to be
compatible with your project. Navigate to the
Wireless tab and the Basic Wireless Settings sub-tab
(Figure 6). Set your Network Name (SSID); I chose
“DLClab.” Enable SSID Broadcast because the
chipKIT libraries need it. Use the “Manual” mode.
Save your settings.
Now, navigate to the Wireless Security sub-tab;
set your Security Mode to “WPA2 Personal,” and
your Passphrase to something; I chose “bogosity”
(Figure 7). Save each of your changes. You are now
ready to configure your sketch and play with your
You will need to customize the HttpServer
sketch to match your Wi-Fi and network settings.
Don’t worry! This is easy. If you have installed all
the files as I’ve instructed, you can now open your
sketch by File->Sketchbook->HttpServer. You will get
an MPIDE screen with a bunch of files in tabs as
shown in Figure 8.
We need to edit HttpServer.pde to use the
router and Wi-Fi settings you entered in Step 2
above. Look for the following lines in the sketch
and set them as below:
// Set to 1 if using open security,
// otherwise WPA2 is used
#define USE_OPEN_SECURITY 0
// Only has meaning if doing WiFi, 0 ->
WPA2, 1 -> Open