This project shows how to send SMS text messages to a cheap scrolling LED display via an Android app and arduino with USB host shield.
The project was originally inspired by a friend wanting to make a “sexting themed” costume, with a scrolling LED display of live texts sent from people at the party. We found a $13 LED belt buckle online, which looked cool, but only had a few buttons to manually enter in messages. A couple wires and lines of arduino code later, we were able to automate entry of messages.
We then added a host shield and wrote a small Android app to send txt messages on to the arduino.
Step 1: Required Parts and Code
–Android Phone (2.3.3+)
–USB Host Shield (SparkFun one used here)
Step 2: Automate Message Entry on LED Display
The display has three buttons that you use to change the messages. It’s a long process, since you have to scroll to each letter one click at a time, and there’s no speed-scroll. We pop open the case to see if we can easily attach wires to the buttons in order to automate message setting.
The three push button switches simply short the bottom side of the switch to ground when pressed. We’re going to simulate this action by switching the bottom side of the swtich between a high impedance pin (a digital input) and ground (a low digital out). This is easily done by switching the direction of the pin on an arduino, using pinMode(pin, INPUT) or pinMode(pin, OUTPUT). Just make sure the output is set Low before setting the pin to output (digitalWrite(pin,0)).
Four wires are attached, three for the switches, one for ground.
Step 3: Wire LED Display to Arduino
Use pliers to make a hole for the wires to pass out of the LED display.
Then, attach the black wire (On/Off/Enter) to Arduino Digital In 2, Red (Page Up) to Digital In 3, and Yellow (Page Down) to Digital In 4.
Test out the code by uploading to the arduino, and then opening the serial monitor at 57600bps. Be sure to turn ON ‘newline’ next to the baud rate setting. The code uses the ‘\n’ character to find the end of words. After you type in a phrase and hit enter, the arduino should fast forward through the same button pushes you would do by hand.
The code itself has more details, but a simple lookup table that’s very similar to the asciitable provides the right number of “presses” to get to each letter. There are settings in the code that define how long the button press duration should be, and how long it should wait in between presses. It takes the LED display longer to save a letter than to cycle through the available letters, since it’s storing off data to flash.