Control your Hexbug Spider with Arduino

José Nieto
3 min readApr 2, 2017

--

The Hexbug Spider is a pretty awesome toy, you can control this cool hexapod with the small IR control it includes, it can go forward, backward and even do a full rotation.

The infrared remote controller that comes with the Hexbug Spider generates special signals that are invisible to the human eye, the Hexbug Spider has a special IR receptor on its head that recognizes signals the IR controller generates and translates them into movements.

One day, out of pure curiosity, I set up an IR receptor and hacked the patterns for different IR remote controls: a TV, an Apple TV and the Hexbug Spider. The result of this hacking spree was the IRDump library, you can use that library to find the patterns that IR transmitters emit when a certain button is pressed.

I’ll talk about IRDump later, in this post I’m going to focus on how you can control the Hexbug Spider using a pretty simple setup.

We’re gonna need an Arduino UNO board, an IR LED, a common red LED, a resistor between 200 and 1000 Ohm, a tiny breadboard and a few spare jumper cables.

Wire one of the PWN pins of the Arduino board (3) to the longer lead of the IR LED, connect the second lead to the longer lead of the red LED via the resistor, the second lead of the red LED goes to Arduino’s GND.

It should look like this:

Here’s an schematic view of the same setup:

Feel free to bend the IR led a bit so you can point it more easily to the spider’s IR receptor, this is how it should look at the end:

On the software part, clone both arduino_hexbug_spider and arduino_irdump into your Arduino libraries directory.

cd /Users/rev/Documents/Arduino/libraries/git clone https://github.com/xiam/arduino_hexbug_spider.gitgit clone https://github.com/xiam/arduino_irdump.git

You can find this directory by going to your Arduino IDE Preferences dialog.

Open your Arduino IDE and go to File > Examples > arduino_hexbug_spider > hexbug to load the main example. Review the code, compile and upload it to the board.

Once you see the prototype working it’s time to hack on it and remix something new!

Happy hacking!!1

--

--