XBEE Wireless Heart Matrix

Views: 3141 Difficulty: 3 Status: Pipeline

Control the Heart Matrix LED display wirelessly, using XBEE radio modules.

We show how to control the Heart Matrix LED display wirelessly using XBEE radio modules and our 5V XBEE breakout board. Don't have a Heart Matrix? Don't worry, you can follow this tutorial even if you are using another XBEE breakout board, and/or a different display. What is the Heart Matrix you ask? Check out the original tutorial! Learn more about XBEEs here. We use the simplest Serial port functionality of the XBEE running at 9600 bps. This is the factory setting for most XBEEs so no configuration should be necessary. We hook up the TX pin of the XBEE to the RX pin of the Arduino (pin 0) and the RX XBEE pin to the Arduino's TX pin (pin 1). Now when we use the Serial library we will be writing to and reading from the XBEE module. Grab the code below!

XBEE and our Arduino Clone Wireless Heart Matrix Control

Here we have the XBEE plugged into one of our Arduino clones, which is also driving the Heart Matrix.

Wireless Heart Matrix with XBEE

Combining our 5v XBEE breakout board, and our Heart Matrix LED Display, you can send messages wirelessly over the serial port. You can send them from the Arduino Serial port window, or from any program that can write to the serial port, like in our tweetheart tutorial where we use Processing to send tweets to the Heart Matrix.

Arduino Code To Read Text From The XBEE on the Serial Port

This code displays Hi at startup. If it gets a message over the serial port it will append the characters to message string and display them on the Heart Matrix. If it receives an 8 (0x08) [the ascii delete control character] the message variable is set to the empty string. You will need the FrequencyTimer2 library and our Heart Matrix arduino library which you can download here, at the original Heart Matrix Tutorial.
/* LucidTronix write messages from
 * the serial port on the Heart Matrix.
 * For instructions details and schematic, See:
 * For details on connecting with XBEE, See:
 * Connect the data, latch, and clock pins
 * to the corresponding pins on the heart matrix
#include <FrequencyTimer2.h>
#include <HeartMatrix.h>
String message = " Hi ";
// dataIn is on 5, Latch is on 6, and Clock is on 7
HeartMatrix hm = HeartMatrix(5,6,7);
void displayer2(){  
void setup() {
   // Set refresh rate (interrupt timeout period)
   // if things break try making this number bigger
    // Set interrupt routine to be called
void loop() {
   while (Serial.available() ){
     char c =;
     if (c == 8) message = "";
     else {
       String s = String(c);
       message += s;


Title Description # Cost Link Picture
Heart Matrix Kit The heart matrix kit. Shift register based wearable heart-shaped LED display. 1 $17.95 Link Heart_matrix_baggy
XBEE MODULE ZIGBEE W/WIRED ANT 2.4GHz 2.1 V ~ 3.6 V 38mA -96dBm 250kbps Value: 2.1 V ~ 3.6 V 1 $17.0 Link Xb24-z7wit-004
Connecting the MCP79410 real-time clock chip and our Heart Matrix you can show the time with love....
Two LED matrices give 70 LEDs to light up a necklace with messages....
The heartduino is a heart-shaped arduino clone complete with onboard sensors and a 70 pixel LED matri...
Standalone programmable Heart-Shaped LED display....
This circuit lets you talk to an XBEE serial port with 5V power and just two signal lines: RX and TX....
Wearable digital compass displays the direction in green LEDs....
Control the hue, value and saturation on this pocket-sized joystick drawing machine....
Build your own clock with the MCP79410 chip and 4 7-Segment LED modules....