XBee feats!

It’s been a very productive couple of months for me. I’ve been using the XBee protocol to communicate between Max/MSP and some Arduino microcontrollers. Here are some videos of what I’ve been up to:


This video is a quick summary of the wireless Lilypad module I’m using to sense footsteps and trigger playback samples. The buttons are set up with pulldown resistors to be read by the Arduino. The voltage regulator steps down the 9v battery to a 5v that the Arduino can handle. Sending it more than that will fry the board. Bad news.

The XBee module is configured with a send (“DL”) address that is the same as the receive (“MY”) address of the antenna hooked up to my computer. Any serial messages the Lilypad’s XBee receives from the Arduino will be sent directly to the XBee plugged in to my computer, which is acting as a hub. It’s basically the same as having a super-long USB cable – the XBees are designed to be “serial transparent”. All they need is a quick address assignment, and they’re good to go.

Unfortunately, if I need to reprogram the Arduino board, I have to disconnect the entire XBee module from the Arduino, as the XBee is occupying the transmit and receive pins of the Arduino (which it needs to interface with the computer). I need a reliable way to configure that.


This video is Gabriel, the lead performer in Mark McCoin’s upcoming show, walking around with the Lilypad Arduino setup. This will eventually be sewn into his costume, though right now it’s taped to his back. I might end up rewiring some things to make it more streamlined so it can fit into his costume, but for now it’s doing a great job as it is.


This is a video of the wireless motor controller, which uses an Arduino Duemilanove and an Arduino XBee shield.

Most of these parts have been purchased through SparkFun, which is an incredible company (amazingly, based out of Boulder. A couple of my friends work there).

Of course, none of this would be possible without help from the esteemed Michael Theodore, who has helped me numerous times in fixing my patches and programs. Tom Igoe’s blog and book “Making Things Talk” have been very helpful as well.

I’m not going to post the Arduino code right now, as it will probably take up an awful lot of space, and I’m already including the Max patches for the devices, which I think are the hardest part to figure out anyway. If you need help with it, feel free to contact me.

Here are the Max patches I’m using for each controller:

The Lilypad sound file player:

———-begin_max5_patcher———-
1020.3oc6Z1sbiZCEG+Z6mBF5stdzQBDhsW0Wf9BzYmcvXEGZwHO.d2jry1m
8hNxNwNUQHWyxRb6LY.KAF8W+74KIxWmOKbk5AYSXvGB98fYy957YyvtzcL6
P6YgaydHuLqAusvsxllrMxvElq0JenE6OuTlUer2h0XepU+wOSSN14tr176K
p17oZY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ajIeBV1WPfyVVNYwIGfSVYzv
qa5OBcC.A+G+HFydkfIuNugYSoRX3soabkSUeV5iXB9SjO47Rmf5lx7P3QSP
gC9HbXbiB6S1ywMY0zCRTenDHlfZ5ZpEqqw2l+2.fLcOp
———–end_max5_patcher———–

And the Wireless Motor Controller:

———-begin_max5_patcher———-
1059.3oc4Y98aZCCDG+Y3uBqn9HC4yN+buM0sJ0G15zzj5CSUSAvklsPREIn
0sp9+9RrgAz5Xt1BdAPUMHLAy26SNe24y22siyf76DENj2R9FoSm661oibn5
A5L+8cblDe2vz3B4s4jMax.wTmdpOJYjbv7A+3M.rXvaiKGdSR13uOULrTM2
bWu9zdDNkW+hGs9Jq5J4p4em7YkohxxeeqP8EbRxJc5QbFDmM14e2004YkYw
Sj2iy6llDmt32rRVIYUyfTjvxAUyqbT1JSRQxejSBv5SqG8gtcquzCIDlHJJ
hGKV7iWJtSZmNm.DfRoZnC20DcnfDHJt34VeEBMQmmMRXZQBr8PRl3WU14SH
RZRlfP6qyewHQXJhDDT+hq+l8WpcVj++bICWKY36dmEZS9J.yDY7oq3q3FrO
5qzDQt3ryzgCJBbvhjwWbOjvQUHPxIfNhDYfHrfPIJ7kgZcoGGDwyDQXpjOJ
WkiEhvMPDPEWk6CGdDQWD0PSdG9xrKbdvxRSNjYguIVPmyB1wAKLUBBnxsx4
96urnghxJD0RhDSh70WrZDBejPYP0fHzkx29JiuA7jnCIgFqeW5pvhTEgv56
gAI6KdKZwQfIODW9wFNLETEhnGB3nLe73TgNi2TkFQJWAl6hvDOKaGQ3.X68
jchnbZdk7zYilZtQjLaIyU970Kby13KpoF+u72KICp+SGTLswLXdOMB.r6fW
RkdO50sSNis3t4GLqrLOSCMXFKxLPU+fmO10Aqa81cgvrraiG9SBPzsTfYr3
.djpNIoE5iu3fWRHucd8AohQ5.fwbeb05et+KJfW90WOLOMep5yn8YzfPWdO
hbdTtPqLW6HuhFLai43Bb26M6lWY6YL6NWsx1cOZkMknqkALisLvWlkCTcWZ
eek8v7ISD056Q748m+kOb5WO+hOoqiJgFW.nbSAIkB7dBddUVNc2a4e9xOpy
lMsnmCxs8Dp5QOzZM4Fqb0XlLO0d5.dapx0FMEi4jnrVnozTeZN8zK0XeF6u
qqps+bUadiNj5ZkVXXLNcDrJLj61beCFEoIizeFyFOxPoECzU7xAWJNKGiO9
7QWXaLOu0LN4bIOuyGcd5RsVO95VbQ9roCWnjEGQLYoZGIJJSxhKSppIY4MA
qeS2jLZjHa03kSRFcad0524hfbkV9iUS.BIwsrjnXvDytZByit5VHVsmJqoI
VKzcJBCmhrpljOV1HmrqlpONyVGmBvvIO6xIdKjS9X3D2tZhhM9jk0DrIMEX
eMw1jl7splPExLvpoVvDIPRI6IINpJUn10aBUzIvpZpt6sabUWj8kzlvjciC
fI8KytgKYXJSgY4mb71myDu04Lgw8lYWIgI.Nyto4XnVyY4xlvHIu1W0kt1M
0KlHS1cuun1qhcKPAUKBfWSw.Uu4gt+kgJtDH
———–end_max5_patcher———–

Leave a Reply

You must be logged in to post a comment.

Nathan Wheeler's blog about music composition and sound engineering at the Univeristy of Colorado at Boulder.