The last time Hackerfall tried to access this page, it returned a not found error. A cached version of the page is below, or click here to continue anyway

WarSting: A Wi-Fi scanning sword for Hobbits. — Particle Blog

Today, The Hobbit: The Battle of Five Armies hits the theaters. Bilbo, our favorite hairy-footed protagonist, will face formidable foes armed with his mythical sword, Sting.

Sting's particular magic is that it glows blue whenever orcs or goblins are nearby. This is useful for hobbits, but in today's day and age, a real Sting would be unfortunately boring.

But what if Sting could detect unsecured Wi-Fi networks?

To celebrate the launch of the new Hobbit flick, we made a version of Sting that turns blue near unsecured Wi-Fi networks. And when you slash the sword, Sting will jump on the network, and publish a message: "{YOUR WI-FI NETWORK} has been vanquished!"

This hack is inspired by one of our favorite recent projects, WarKitteh, in which a Siamese cat named Coco was enlisted to wardrive his owner's neighborhood. Hobbits are known to travel further than the typical housecat, and therefore make great wardrivers.

Step 1: The ingredients

To make your own WarSting, you'll need two things: a toy Sting, and a Spark Core.

A toy company named The Bridge Direct, Inc. sells (next to Power Rangers and Justin Bieber action figures) a $29.99 plastic replica Sting sword. WITH LIGHTS AND SOUND! This is a great hack because:

The other thing you'll need is a Spark Core, a Wi-Fi development kit - sort of like a Wi-Fi connected Arduino. It's a reprogrammable chip that has a Wi-Fi module on board and can interact with sensors and actuators, like the ones in the sword.

This is what we do, so we have a whole bunch of them sitting around. If you want a Core, you can get them on our website for $39 each.

Step 2: Disassemble the sword

All of the electronics in the sword are contained in the hilt, which can be accessed by unscrewing a couple of screws. Here's what you'll find inside:

There are basically four components that matter here:

Step 3: Splice in the Core

We want the Core to be in control of whether the LEDs are on and whether the little sound circuit is making a sound. We also want it to detect the signal from the vibration switch. Here's a diagram of our circuit:

This is an overly simplistic diagram, and isn't a totally accurate picture of what's going on here. We're not hooking up to a single LED; we're hooking into a pre-existing subsystem which actually includes multiple LEDs. And we're also not hooking up to a speaker; we're hooking up to a whole system for producing sounds where simply sending voltage to a black box of a circuit will create a SLASH sound.

This hack is pretty straightforward; it's simply a matter of cutting the wires in the sword and soldering the wires to the pins of the Spark Core.

Step 4: Reprogram the Core with network-vanquishing firmware

We've written a firmware application designed for the WarSting that scans for unsecured networks, makes sounds, blinks the LEDs, and publishes messages from the unsecured network. All in, it's about three hundred lines of code. Here's a sample in a gist:

In addition to this firmware application, you'll have to include the wifiscan.h library, which scans for networks. The complete firmware can be found on our Github repo for WarSting:

Step 5: Reassemble the sword

Put the sword back together. This is the opposite of step 2.

Step 6: Vanquish Wi-Fi networks

Power up your new WarSting, and when the sword turns blue, start slashing! If you have a few unsecured networks nearby, WarSting will vanquish them one at a time, until they've all been vanquished, after which the sword will no longer glow blue.

In conclusion

So there you have it! If you want to build your own WarSting or create your own wardriving product, fork our Github repo:

To get a Spark Core (or our recently announced Photon), visit our store here:

Buy a Core or Photon now

Enjoy your hobbit journey, and if you're interested in more fun projects, check out the Spark project site on Hackster for all kinds of inspiration!

Continue reading on