Flora + Fona SMSsenger Bag

Scroll text messages on your bag, jacket, or any other surface, using a Flex NeoPixel Matrix and Flora + Fona! Combining these two powerful boards can create the wearables projects of your dreams! This guide starts by covering the particulars of hooking Fona up to Flora including wiring and code modifications, so you can take most any Fona project and build it with Flora.

Before you begin, make sure to familiarize yourself with the following prerequisite guides:

Supplies

To build this project, you will need the following parts and tools:

Code Library & Modifications

Before you can start communicating with Fona, you’ll need the Fona library for Arduino. You can install it directly from the Arduino app under Sketch -> Include Library -> Manage Libaries (Arduino 1.6 and above).

The older, slower way to install the library is to download it directly from github: Download the Adafruit_FONA Library

Rename the uncompressed folder Adafruit_FONA and check that the Adafruit_FONA folder contains Adafruit_FONA.cpp and Adafruit_FONA.h

Place the Adafruit_FONA library folder your arduinosketchfolder/libraries/ folder.
You may need to create the libraries subfolder if its your first library. Restart the IDE.

Here’s a tutorial on Arduino library installation:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use

In any Fona sketch you use, change the following variables to better suit Flora’s layout:

#define FONA_RX 10
#define FONA_TX 9
#define FONA_RST 6

For testing the different functions of Fona, head to instructions on the main Fona guide! It’s tons of fun to experiment with the SMS function using the Arduino Serial Monitor interface (FONAtest).

Other pin configurations are possible, but for simplicity and consistency with the diagram on the next page, we’ve chosen to set the software serial port to pins 10 and 9, and the Fona reset pin to 6.

Flora is capable of hardware serial communication, and although not yet officially supported in the Fona library, advanced users may wish to try this code modification!

Circuit Assembly

Wiring connections are as follows:

  • Fona Vio -> Flora 3.3v
  • Fona RX -> Flora D10 (configurable)
  • Fona TX -> Flora D9 (configurable)
  • Fona Key -> Flora GND
  • Fona RST -> Flora D6 (configurable)
  • NeoPixel matrix DIN -> Flora D12 (configurable)
  • NeoPixel matrix 5V -> Flora VBATT
  • NeoPixel matrix GND -> Flora GND

Flora can only be powered from the JST or USB port, so solder a JST cable to Fona’s Bat and GND connections and plug it into Flora.

This wiring configuration takes advantage of Fona’s onboard USB lipoly battery charger. But it does mean that either a battery or USB power must be connected to Fona even when Flora is plugged into USB for debugging– Fona can’t be powered from Flora’s USB port.

Solder the other wire connections as described in the circuit diagram.

Open the SIM door and install your SIM card, then replace and latch the SIM door closed (it will only fit one way).

Now you’re ready to test out the Fona demo sketch (don’t forget to update your pin variables to reflect the connections to Flora)!

Next, solder sturdy wires to the NeoPixel Matrix. This thing draws a lot of current, so solid connections are an absolute must! To evenly distribute the power, connect up all the GNDs to each other, and likewise with the 5v pads. You can twist two pieces of wire together, tin the twist and the pad, then reheat both together to join. The input side will look like this:

If you get errors when trying to upload to Flora, be sure you have the NeoMatrix, NeoPixel, Adafruit BusIO and Adafruit GFX libaries for Arduino installed, and that the right board and serial port are selected. You can install libraries directly from the Arduino app under Sketch -> Include Library -> Manage Libaries (Arduino 1.6.4 and above).

When your matrix is up and running, you can disconnect the battery and USB cord and protect the wire connections on the matrix with E6000 adhesive. While you’re at it, squeeze some adhesive into the top of the battery, where the wires connect, for some strain relief. Allow glue to dry for 24 hours.

Next, solder up the connectiosn to Fona according to the circuit diagram. Attach the GSM antenna to Fona, and the battery to Fona’s JST port.

Add some Velcro tape to secure the battery. Your finished circuit should look something like this:

Solder your free 5v connection to VBATT on Flora, and your spare GND conenction to GND on Flora. The data input pin should be soldered to pin D12.

Load up the NeoPixel Matrix demo sketch, change PIN to 12, connect the battery, and make sure you see a message scrolling across the display before proceeding! It’s much easier to troubleshoot problems incrementally than it is to wire everything up and try to identify a wiring error later.

If you get errors when trying to upload to Flora, be sure you have the NeoMatrix, NeoPixel, Adafruit BusIO and Adafruit GFX libaries for Arduino installed, and that the right board and serial port are selected. You can install libraries directly from the Arduino app under Sketch -> Include Library -> Manage Libaries (Arduino 1.6.4 and above).

When your matrix is up and running, you can disconnect the battery and USB cord and protect the wire connections on the matrix with E6000 adhesive. While you’re at it, squeeze some adhesive into the top of the battery, where the wires connect, for some strain relief. Allow glue to dry for 24 hours.

Next, solder up the connectiosn to Fona according to the circuit diagram. Attach the GSM antenna to Fona, and the battery to Fona’s JST port.

Add some Velcro tape to secure the battery. Your finished circuit should look something like this:

SMS Scroller Code

Next its time to load up the SMS-recieving-and-displaying Arduino sketch, included below. Make sure you have the Fona library installed!

Sew a Fabric Pouch

Choose some fabric for the front diffusing part of the pouch– it doesn’t have to be white! Black material can also work well as long as it’s translucent. Experiment, even bring your circuit to the fabric store! Trace the perimeter of your matrix onto the fabric with a disappearing marking pen, then draw a bigger rectangle that’s ~1″ larger in each direction than the first, for seam allowance.

Cut out the front panel, and make a back panel that is slightly larger than the front. Fold over and iron the edges of the back panel around the raw edge of the front panel, and topstitch around three sides. Add velcro tape to the top edges and stitch the finished pouch to your bag, jacket, curtain, or any other fabric substrate you wish to adorn.

Wear it!

When you power it up with Flora’s onboard switch, the matrix will display the last SMS it received. Eventually your SIM will fill up, though, as this code does not delete any messages it receives. To clean up your SMSs, load up the FONAtest code example and use the serial interface to delete them.

These pixel matrices are nice and relatively flexible, but are not designed for repeated or extreme bending. If your application puts excessive bend force on the matrix, consider adding a cardboard or other stabilizing material to reduce the amount of bend.

Unless you sewed your pouch with waterproof fabric and sealed the seams, this project is not weatherproof! If you get caught in the rain, power down your circuit and stow it inside your bag.

Originally posted on Adafruit

%d bloggers like this: