OLED Watch with EagLED

Difficulty
Moderate
Steps
14

The EagLED e-textile wearable development kit comes with LEDs and sensors as well as SCL and SDA sew tabs. By using the SCL and SDA sew tabs on the EagLED, it is possible to connect via I2C to other external sensors or modules,

In this guide, learn to connect a 0.96'' OLED screen to the EagLED and create your own simple OLED watch. The watch shows the time as well as uses an LED as a visual reminder.

Complete this guide to get familiar with using the EagLED together with other components through I2C.

The parts

In this guide, we'll be creating a simple OLED watch with the EagLED! The components used:

  • EagLED
    • The main board
    • LED
    • The coin cell battery holder
  • 0.96'' SSD1306 OLED screen
  • Alligator clips
    • This will only be used in the prototyping process
  • CR2032 coin cell battery
  • Sewing needle with large enough eye for easy threading, we recommend one of these needle sets.
  • Conductive thread
    • We'll then sew the components using conductive thread
  • Felt fabric and craft paper or cardboard
  • Fabric scissors
  • 22AWG wires
  • Soldering iron
  • Solder
  • Wire cutters

I2C

I2C stands for Inter-integrated Circuit and it is a communication protocol. 

  • It allows multiple devices to communicate with each other over typically short distances. 
  • It can be used to communicate with more complex components such as a 0.96'' OLED screen. 
  • The OLED screen has SDA and SCL pins which are connected to "#2" and "#3" sew tabs on the EagLED.

0.96'' OLED Screen

What is an OLED screen? An OLED screen stands for organic light-emitting diode screen, composed of layers including layers of organic compound that lights up when fed with electricity. 

Since the mid-twentieth century, the electroluminescence of organic materials has been a well-known phenomenon. Then in 1987, organic light emitting diodes (OLEDs) became known for its promising practical applications. Ever since then, it's become a popular choice as a bright, vibrant display that can offer beautiful colours, energy efficiency and it can come in a variety of form factors i.e. as transparent and flexible displays. Also, it works without a backlight and can display deep black levels as well as a high contrast ratio in low light conditions i.e. in a dark room.

In this guide, an SSD1306 0.96'' OLED module is used. 

The SSD1306 OLED screen has four pins:

  • GND: In electronics, we define a point in a circuit to be a kind of zero volts or 0V reference point, on which to base all other voltage measurements. This point is called common ground or GND.
    • Note: Voltage is the difference in electric potential between two points. As it is difficult to talk about voltage without a reference point, we need another point to compare it to.
  • VCC  : While 'VCC' stands for Voltage Common Collector, we'll connect the VCC pin to 3.3V on the EagLED
  • Serial Clock (SCL)
  • Serial Data (SDA)
    • Note: To connect the SCL and SDA pins to the EagLED, they must be connected to Pins 3 and 2. 

Step 1  The prototype

Before stitching the EagLED and components to felt fabric, alligator clips can be used for prototyping. 

M-F jumper wires are used to connect to the SSD1306's header pins and alligator clips as shown.

Then alligator clips are connected to them and the EagLED.

Step 2  SSD1306 Arduino library

  • Start the Arduino IDE
    • Note: Before you can use the EagLED with Arduino IDE, it requires the necessary library. Please follow our guide 'Get Started With the EagLED' to set it up.
  • Next, to keep it simple, we'll use an existing SSD1306 library.
    • So open up the Library Manager: Click on Tools > Manage Libraries 
    • Install the SSD1306 library by Alexey Dynda
    • Once complete, it should say "INSTALLED" next to the library name

Step 3  The Arduino sketch

  • Go to File > Examples > ssd1306 > direct_draw > clock
  • Change the variables 'hours' and 'minutes' to the current hour and minute.
  • Click on the 'Verify' button up the top left hand corner of the Arduino IDE
  • Then click on the 'Upload' button beside it.
  • The OLED screen should now show the current time

Step 4  Solder wires to OLED screen

Next, we'll move the prototype onto the felt fabric.

  • First, cut the header pins protruding at the back of the OLED display module with the wire cutters. This is so that it can lay flat against the felt fabric.
  • Then solder four wires to 'GND', 'VCC', 'SCL' and 'SDA'.
  • Insert heat shrink tube and apply some heat so that it shrinks and wraps around the wires to prevent any accidental shorts.

Step 5  Connect OLED screen to EagLED

Then connect these wires to the EagLED:

  • 'GND' to 'GND' 
  • 'VCC' to '3.3V'.
  • 'SCL' TO 'SCL#3' 
  • 'SDA' to 'SDA#2'

Step 6  Connect coin cell battery holder to EagLED

  • Stitch a line of conductive thread from '-' on the coin cell battery holder to 'GND' on the EagLED. 
  • Then stitch a line from '+' to '3.3V'

Step 7  Felt fabric for front covering

 Cut out another rectangular length of felt fabric of the same size as the previous one. 

Step 8  Add an LED

Additionally, you may want to add an LED.

  • Stitch a line of conductive thread from '+' on the LED to '#6' on the EagLED
  • Then stitch another line from '-' on the LED to 'GND' on EagLED.

Step 9  Arduino sketch for OLED watch with LED

We've changed a few things from the previous sketch.

Over at the top, we've added a variable for the LED and assigned it to Pin 6 with int LED = 6; 

Then in void setup() we've added pinMode(LED, OUTPUT); 

Finally, we'll use this LED as an indicator that a particular time has passed. This can be used as a visual indicator or a reminder for an event in your daily schedule etc. In void loop() we've added:  if (hours == 12 && minutes == 36) { digitalWrite(LED, HIGH); } 

Change the hours and minutes in that if statement to the particular time you'd like to set it to.

Step 10  Sew felt fabric pieces together

Stitch together the two pieces of fabric to enclose and secure the watch.

Step 11  Complete OLED watch with EagLED

The complete OLED watch with EagLED!