Bodies in Wearables Tutorials

These example tutorials were written for the Bodies in Wearables Jam.  This wearable jam will provide participants with the opportunity and support to apply the skills introduced through the Bodies in Wearable Workshop Series to develop a concept into a working wearable prototype.

All of the examples use an Adafruit Circuit Playground Express on the MakeCode platform. An overview of the Circuit Playground Express can be found here.

List of Tutorials

Getting Started

Kit Materials

Bodies in Wearable Kit

This custom kit contains the parts that are used in the following tutorials. A Bodies in Wearables Kit Shopping List for Online Participants can be found here.

Return to List of Tutorials


Circuit Playground Express (CPX) & MakeCode

The Circuit Playground Express is a microcontroller from Adafruit Industries. A microcontroller is a piece of hardware that allows us to interface with the real world around us using code. The CPX is a versatile and beginner friendly board. The board has a circular form factor and is good for a variety of uses. 

The CPX can be programmed in different ways for the jam we will focus on MakeCode. MakeCode is a block-based editor that is perfect for the beginner programmer. You do not need any dedicated software to run MakeCode; it can run from any browser on a computer. Another advantage of MakeCode is that you can simulate your code on the browser before running it on the Circuit Playground Express.

The Circuit Playground has different power connection options;

  1. It can be connected using a micro USB cable connected to wall adapter or portable battery 
  2. Lithium ion polymer rechargeable battery with JST connector  
  3. Standard battery holder with JST connector

Return to List of Tutorials


Basic LEDs

The Circuit Playground has two indicator LEDs located on each side of the USB slot. In this tutorial we shall be blinking the on-board LED all you need is a USB micro cable. Connect your CPX to your computer, download the MakeCode code and load it onto your CPX.

Link to code

Return to List of Tutorials


Fairy Lights

There are many types of LEDs that you can connect to the CPX, but for wearables, fairy lights can be very easy to work with because they are low-cost and you can connect a whole string of lights with just two connections.

Preparing the fairy lights

First, snip the battery pack off of the fairy lights with small snips or scissors. Next, use sandpaper on the ends of the wires to remove the resin coating and expose the conductive metal.

Connecting to the CPX

To Connect your CPX to the fairy lights you will need the 2 alligator clips, a resistor, and a USB micro cable. Connect one alligator clip to the ground pin of the CPX and the other clip to the A2 pin. Connect the ground pin alligator clip to one end of the resistor and the other end to the fairy lights, then connect the A2 alligator clip to the other end of the fairly light. Load the code onto the CPX to light up the fairy lights.

Circuit Diagram – Using a resistor is ideal but the circuit will still work without it.
Link to code

Return to List of Tutorials


NeoPixels

The CPX has a ring of 10 multicolor RGB LEDs also called NeoPixels. They can light any color and be addressed individually.

Turning On Neopixels

To turn on the Neopixels, connect your CPX to your computer using a USB micro cable, download the code and load it onto your CPX.

Link to code

Return to List of Tutorials


Neopixel strip

In this tutorial we shall connect the NeoPixel strip to the CPX. Start by connecting the red alligator clip to the VOUT pin, black to ground and white to the A1 pin then load the code onto the CPX.

Link to code

Return to List of Tutorials


Servos

In this tutorial we look at various examples using two types of servo motors one is the 180 degree servo and the other is the continuous 360 degree servo. To connect the CPX to a servo you will need the alligator to servo cable, the black alligator wire connects to the brown servo wire, red wire connect to red and white connects to orange. Connect the black alligator clip to the ground pin, red to the 3.3V pin and white to the A2 pin, the load the code onto the CPX.

180 degree servos

Range Test

Link to code

Return to List of Tutorials


Button-Activated Motion

Link to code

Return to List of Tutorials


Looping

Link to code

Return to List of Tutorials


Continuous 360 Degree Servos

Toggle Direction

Link to code

Return to List of Tutorials


Sensors

In these examples the on board sensors are used to light up the CPX NeoPixels. It explores motion sensing using the onboard accelerometer and the sound sensor.

Using shake sensor

Link to code

Return to List of Tutorials


Using sound sensor

Link to code

Return to List of Tutorials


Servo Motor Mounts

Download all 3D design files here

90 degree servo mechanism

Arm and Base

Assembly

Return to List of Tutorials


Multi-angle servo mount

Mount and Pins

Assembly

Return to List of Tutorials


Mounting Material on Servo Arm

Return to List of Tutorials