Skip to content

10. Wearables

This week in electronics we learned how to use multiple LEDs at the same time and other types of elements such as the speaker. I have tried using thermochromic paint with little success.


They have different colors, shapes and sizes. Neopixel has several products:

  • Strips

  • Rings

  • Matrices

  • Sewble Neopixels

How to connertter them > you have to give power to the neopixels by connecting them to the circuit Neopiexels have verses: GND, 5V, Arrow

Neopixels & Digital Sensor.

  • Open Sketch 04_wipe switch
  • Define the PIN where the Led is connected.
  • Led Count > how many leds there are in a strip.
  • Define the Switch Variable (position and status = 0).
  • void setup > let's analyze the strip (the object that represents the Neopiexels).
  • pinMode (no extra resistor) > sw_ pin; INPUT PULLUP
  • read and save sensor values > sw.status = digitalRead (sw_pin)
  • If switch status = 0/LOW (if it is pressed, the red animation starts).
  • color Wipe. Color (255,0,0)50) > 50 is the speed
  • stri.fill > turns off the leds

Rainbow neopixels with a digital sensor

Check the same elements as before for Sketch 04_ rainbow_sw

Neopixels & Analog Sensor

  • Purpose > to display with all LEDs the pressure I apply to the sensor.
  • There is a tool called Calibrator that is inside the sketch and it allows us to skip the do where we have to check the maximum and minimum value of the sensero because it does it automatically. During the first 10 seconds I have to press the analog sensor and Arduino will learn which is in maximum and minimum automatically.


Tools needed:

  • speaker (I used a spiral created with conductive wire and paper tape).

  • We use the transistor as an electrical switch by applying a voltage to the gate with Arduino. This way current can flow between the drain and the source.

  • If you can use an external power source otherwise use Arduino UNO (since we do not need a constant Voltage).

Sound + sketch

  • open sketch 07_ sound
  • you have to define the Pin of the Variable
  • void setup > the speaker is an OUTPUT
  • void loop >Tone turns the leds on and off. You have to indicate the potion and frequency ( between 20 to 20000Hz > sound audible to human ears)
  • No Tone = the speaker is turned off.
  • Load sketch You will hear something from the moment you bring the magnet close to the speaker

Termochromatic Ink

  • Green thermochromic pigment + vinyl glue = we get a paint to lay on our piece of fabric. (The pigment will become lighter tending to white with heat.)

  • Let it dry and embroider with conductive thread your desired shape. (This will be heated by the current and allow the pigment to change color).

  • We use the transistor as an electrical switch, applying voltage to the gate using Arduino. With this current can flow between the drain and the source.

In the video I test the effectiveness of thermochromic color; unfortunately, the sketch I included was not effective.

Last update: 2022-08-29