Let's Make A Wearable: Part 1

It is fun to carry on a wearable electronics but developing them is great fun too. I love electronics and I like to sew and now I am enjoying developing sewable electronics. I am making some fun stuffs with Adafruits’s wearable platform “Flora”. Working with Flora is very easy, you can yourself make your Party shoes, LED dress necklace, Motion Sensing Gloves or any cool wearable with this. We will be making our Wearable in the upcoming parts, in the first part of the series we will be learning about Adafruit’s Flora and setting up its development environment.

Requirements

Requirements
                                                            Figure 1:
Requirements

Adafruit Flora

Flora is an Arduino Compatible wearable platform. It is very small about 1.75” in diameters, round and sewable. It's built around the Atmega32u4 chip and has a built- in USB support. You just need to plug in and get started making your wearables. Flora is beginner friendly, if you have accidentally connected the battery backwards it won’t destroy the microcontroller. It has an onboard regulator that will prevent it from damage. The power supply is designed to be flexible and easy to use. There is an onboard polarized 2 JST battery connector with protection schottky diode for use with external battery packs from 3.5v to 16v DC in. Can be used with LiIon/LiPoly, LiFe, alkaline or rechargeable NiMh/NiCad batteries of any size. It does not have a LiPo charger to keep it safe and reduce risk of fire as it is not recommended to charge these batteries on fabric. Flora is fabric friendly too, it does not use FTDI headers and won’t destroy the delicate garments. There are 14 sewing tap pads for attachment and electrical connections and you can program with Arduino IDE by using Adafruit’s libraries.

Adafruit Flora
                                                                     Figure 2: Adafruit Flora

Getting Started with Flora on Windows

Download Software

Installing Flora Drivers

  1. Plug Adafruit Flora to your PC with Micro B USB cable. If you are using Flora v1 you will need a Mini B USB cable.

  2. Download the drivers for windows xp, windows 7 & 8 from here.

  3. Unzip the folder.

  4. Go to Device Manager, expand Other devices. You will find Adafruit flora with a notification mark.

    Update Driver software
                             Figure 3: Update Driver software

  5. Right click on that and select Update Driver Software.

  6. Browse and locate the unzipped folder of drivers and select next.

  7. If it will prompt for Windows Security, select Install anyway.

  8. Now you will find Flora listed under Ports with a port number. Remember this port name.

Setting up Arduino IDE

With the Arduino IDE version 1.6.4 and greater you can easily add 3rd party boards directly from the stock IDE.

  1. Open Arduino IDE (version 1.6.4 or higher), Under File menu select Preferences.

    Select Preferences
                                              Figure 4: Select Preferences

  2. A dialog will open. Here under Additional Boards Manager URL’s we will be adding a new URL. This list of URL is comma separated means you can add many, we need only one for Flora. Paste this URL.

    Additional Boards Manager URL
                                                          Figure 5: Additional Boards Manager URL

  3. Save the preference settings.

  4. Go to Tools, Board, then Boards Manager.

    Select Boards Manager
                                                          Figure 6: Select Boards Manager

  5. A dialog Box will open, click on the category drop down menu on the top left hand side of the window and select Contributed.

    Select Contributed
                                                                   Figure 7: Select Contributed

  6. You will then be able to select and install the boards supplied by the URLs added to the preferences. Here, we have to install support for Adafruit AVR Boards, but the same way we can install other boards too. Click Install.

    Install the boards supplied
                                                          Figure 8: Install the boards supplied

  7. Restart Arduino IDE.

  8. Now you will notice the Flora Board listed in the Tool, then Board menu.

    Adafruit Flora Board
                                                    Figure 9: Adafruit Flora Board

Blink onboard LED

  1. Connect your board by plugging the USB cable and select it in Arduino IDE.

  2. Select the correct COM Port on which Flora is connected.

    Select the correct COM Port
                                                       Figure 10: Select the correct COM Port

  3. Paste this Code.
    1. // Pin D7 has an LED connected on FLORA.  
    2. int led = 7;  
    3.   
    4. // the setup routine runs once when you press reset  
    5. void setup() {   
    6.    // initialize the digital pin as an output.  
    7.    pinMode(led, OUTPUT);   
    8. }  
    9.   
    10. // the loop routine runs over and over again forever:  
    11. void loop() {  
    12.    digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)  
    13.    delay(1000); // wait for a second  
    14.    digitalWrite(led, LOW); // turn the LED off by making the voltage LOW  
    15.    delay(1000); // wait for a second  
    16. }  
  4. Upload and run the code by clicking the arrow like uploading button.

    Clicking the arrow
                                              Figure 11: Clicking the arrow

  5. You will notice an LED blinking on Flora which is connected to D7, right after the USB port.

  6. There is also a reset button on Flora, you can press it to reset the program.

  7. Now take the USB cable out and connect it to the battery. The sketch will automatically run on startup and you will notice the LED blinking.

LED blinking on Flora which is connected to D7
                                 Figure 12:
LED blinking on Flora which is connected to D7

Reset button on Flora
                                                            Figure 13: Reset button on Flora

USB cable out and connect it to the battery
                                       Figure 14: USB cable out and connect it to the battery

We have successfully set up Flora’s environment for development of our Wearables. In the next part we will see Conductive Sewing (Sewing with steel) and some more advance stuff.


Similar Articles