# LED Breath Stats Mask

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/049/962/medium800/biometric_breath-mask-1.jpg?1515600121)

Combining&nbsp;[Adafruit’s CCS811 gas sensor](https://www.adafruit.com/product/3566)&nbsp;with a&nbsp;[Circuit Playground Express](https://www.adafruit.com/product/3333)&nbsp;and two&nbsp;[NeoPixel Sticks](https://www.adafruit.com/product/2869)&nbsp;we can quickly put together a mask that displays our breath attributes. This setup will monitor temperature, carbon dioxide and total volatile organic compounds. The sensor is easy to work with using it’s I2C interface and pre-calibrated ranges. A mask is an ideal wearable as it provides a place to house the electronics as well as an option for&nbsp; **continuous monitoring** &nbsp;as it is a hands free device that could be adapted for exercise or sleep. The gas sensors TVOC monitoring can be used as an **indicator of ketosis** as it will detect **acetone levels** on the breath which is a by-product of producing ketones. CO2 levels can also be a helpful **indicator of how much glucose is being burned versus fats**.

# LED Breath Stats Mask

## Materials

![](https://cdn-learn.adafruit.com/assets/assets/000/049/965/medium800/biometric_breath-mask-2.jpg?1515601499)

We will be soldering the CCS811 gas sensor and NeoPixel RGBW Sticks to a quarter sized perma protoboard and the Circuit Playground Express.

![](https://cdn-learn.adafruit.com/assets/assets/000/049/966/medium800/biometric_IMG_20180108_173554.jpg?1515601963)

The mask will need to have several small holes cut into it so we can run the wires for the Circuit Playground Express and NeoPixel Sticks. We will use ordinary nylon sewing string to adhere the components to the mask.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/049/967/medium800/biometric_IMG_20180108_184224.jpg?1515602147)

I've placed the Circuit Playground Express on the blank side of the mask. The other side has a small plastic air filter so we will place a single NeoPixel Stick on that side.

# LED Breath Stats Mask

## Asssembly

![](https://cdn-learn.adafruit.com/assets/assets/000/049/969/medium800/biometric_IMG_20180108_175250.jpg?1515614385)

This [nickel plated nibbling tool](https://www.amazon.com/Premium-Life-360-022-Nickel-Nibbling/dp/B0002KRACO) has been a staple in my lab for the last fifteen years. It makes easy work of trimming down PCBs and knocking off sharp corners. This quarter sized perma-proto board can fit into the mask as is, but I split it in half to save space.

![](https://cdn-learn.adafruit.com/assets/assets/000/049/970/medium800/biometric_IMG_20180108_180617.jpg?1515614505)

Nibble, nibble, nibble.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/049/985/medium800/biometric_IMG_20180108_183750.jpg?1515623382)

Solder 2" leads to each of the NeoPixel sticks. We only need to use the DIN, 5V and GND.

![](https://cdn-learn.adafruit.com/assets/assets/000/049/971/medium800/biometric_IMG_20180108_193711.jpg?1515614649)

Once the electronics are attached to the outside of the mask via sewing through the mount holes and unused pins we can start soldering wires to the perma-proto board.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/049/986/medium800/biometric_breath-mask_bb.png?1515623544)

This above wiring diagram shows which connections we need to put in place. Try and use 2" leads between components so it is to access the proto-board with a soldering iron.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/049/987/medium800/biometric_IMG_20180108_210120.jpg?1515623773)

Final hookup with all the components connected.

# LED Breath Stats Mask

## CircuitPython Code

![](https://cdn-learn.adafruit.com/assets/assets/000/049/992/medium800/biometric_gemma-cp.jpg?1515624505)

 **The Circuit Playground Express&nbsp;** boards can&nbsp;run&nbsp; **CircuitPython** &nbsp;— a different approach to programming compared to Arduino sketches. In fact,&nbsp; **CircuitPython comes&nbsp;factory pre-loaded on the Circuit Playground Express**. If you’ve overwritten it with an Arduino sketch, or just want to learn the basics of setting up and using CircuitPython, this is explained in the [Adafruit Circuit Playground Express Guide](../../../../adafruit-circuit-playground-express).&nbsp;

To use the code below, plug the Circuit Playground Express into USB…it should show up on your computer as a small&nbsp; **flash drive** …then edit the file “ **code.py** ” with your text editor of choice. Select and copy the code below and paste it into that file,&nbsp; **entirely replacing its contents** &nbsp;(don’t mix it in with lingering bits of old code). When you save the file, the code should&nbsp; **start running almost immediately.**

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Breath_Mask/code.py

# LED Breath Stats Mask

## Wear It

![](https://cdn-learn.adafruit.com/assets/assets/000/049/993/medium800/biometric_IMG_20180108_212104.jpg?1515625352)

The Circuit Playground Express will need to initially plugged in for 48 hours so that the CCS811 sensor can burn in. The spec sheet suggests an additional 20 minute warmup before each use.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/049/995/medium800/biometric_breath-mask-3.jpeg?1515625458)

If you wish to see the raw data you can connect to the Circuit Playground Express micro USB connector to a computer and watch the console output.&nbsp; On Linux or OS/X the screen command the /dev/\*modem\* device is the easiest way.&nbsp;

```auto
$ ls /dev/tty.usbmodem*
/dev/tty.usbmodem1421
$ screen /dev/tty.usbmodem1421 115200
```

The above command will show the name of your Circuit Playground Express and connect you to the console on OS/X. You will probably need to adjust the usbmodem#### numbers to match your exist device.&nbsp;


## Featured Products

### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

In Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
### Adafruit CCS811 Air Quality Sensor Breakout - VOC and eCO2

[Adafruit CCS811 Air Quality Sensor Breakout - VOC and eCO2](https://www.adafruit.com/product/3566)
[Discontinued - **you can grab the&nbsp;** Adafruit SGP30 Air Quality Sensor Breakout - VOC and eCO2 - STEMMA QT / Qwiic&nbsp; **instead!&nbsp;**](https://www.adafruit.com/product/3709)

Breathe easy - we finally have an I2C VOC/eCO2 sensor in the Adafruit shop! Add air...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/3566)
[Related Guides to the Product](https://learn.adafruit.com/products/3566/guides)
### NeoPixel Stick - 8 x 5050 RGBW LEDs - Cool White - ~6000K

[NeoPixel Stick - 8 x 5050 RGBW LEDs - Cool White - ~6000K](https://www.adafruit.com/product/2869)
What is better than smart RGB LEDs? Smart RGB+White LEDs! These NeoPixel sticks now have 4 LEDs in them (red, green, blue _and_ white) for excellent lighting effects.&nbsp;These are fun and glowy, and you can control each LED individually! Make your own little LED arrangement with this...

In Stock
[Buy Now](https://www.adafruit.com/product/2869)
[Related Guides to the Product](https://learn.adafruit.com/products/2869/guides)
### Lithium Ion Polymer Battery - 3.7v 1200mAh

[Lithium Ion Polymer Battery - 3.7v 1200mAh](https://www.adafruit.com/product/258)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 1200mAh for a total of about 4.5 Wh. If you need a larger battery, <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/258)
[Related Guides to the Product](https://learn.adafruit.com/products/258/guides)
### Adafruit Perma-Proto Quarter-sized Breadboard PCB - 3 Pack!

[Adafruit Perma-Proto Quarter-sized Breadboard PCB - 3 Pack!](https://www.adafruit.com/product/589)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and then...

Out of Stock
[Buy Now](https://www.adafruit.com/product/589)
[Related Guides to the Product](https://learn.adafruit.com/products/589/guides)

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Jack-o-Theremin](https://learn.adafruit.com/jack-o-theremin.md)
- [3D Printed Heel Clips](https://learn.adafruit.com/3d-printed-heel-clips.md)
- [3D Printed Dragon Lamp](https://learn.adafruit.com/dragon-lamp.md)
- [Breadboards for Beginners](https://learn.adafruit.com/breadboards-for-beginners.md)
- [Sensor Plotting with Mu and CircuitPython](https://learn.adafruit.com/sensor-plotting-with-mu-and-circuitpython.md)
- [Circuit Playground Express Sugar Glider](https://learn.adafruit.com/cpx-sugar-glider.md)
- [The MonkMakes Plant Monitor and CircuitPython](https://learn.adafruit.com/monkmakes-plant-monitor-and-circuitpython.md)
- [Anatomical 3D Printed Beating Heart with MakeCode](https://learn.adafruit.com/anatomical-3d-printed-beating-heart-with-makecode.md)
- [How Tall Is It?](https://learn.adafruit.com/how-tall-is-it.md)
- [CircuitPython Powered AT Hand-Raiser](https://learn.adafruit.com/at-hand-raiser.md)
- [Xenomorph Halloween Candy Bucket](https://learn.adafruit.com/xenomorph-halloween-candy-bucket.md)
- [Circuit Playground Powerpuff Girls Valentine](https://learn.adafruit.com/circuit-playground-valentine.md)
- [Cardboard Circuit Playground Express Inchworm Robot](https://learn.adafruit.com/cardboard-robot-inchworm.md)
- [CRICKIT WobblyBot](https://learn.adafruit.com/crickit-wobblybot.md)
- [The Tilt Trumpet](https://learn.adafruit.com/the-tilt-trumpet.md)
