# Haptic Headband

## Overview

https://youtu.be/xD7bfBx5D9M

Create a vibration notification wearable for timing your meditation sessions and so much more! The haptic motor controller can execute waveforms, taps, clicks, fuzzes, hums, and bumps-- different patterns of vibrating that you can recognize. Build it into a bandana or headband for a meditation timer that gently signals you without the need for your phone's alarm.

Before you begin, make sure you've read the following prerequisite guides:

- [Getting Started with Flora](../../../../getting-started-with-flora)
- [Adafruit Guide To Excellent Soldering](../../../adafruit-guide-excellent-soldering)
- [Battery Powering your Wearable Electronics](https://www.youtube.com/watch?v=U_Q3djsktQs)
- [Adafruit DRV2605 Haptic Controller Breakout](../../../../adafruit-drv2605-haptic-controller-breakout)

For this project you will need:

- [Flora microcontroller](http://www.adafruit.com/product/659)&nbsp;(or other I2C capable microcontroller)
- [DRV2605L Haptic Motor Controller](http://www.adafruit.com/product/2305)
- [Vibrating Mini Motor Disc](http://www.adafruit.com/product/1201)
- [Lipoly battery](https://www.adafruit.com/products/1317)&nbsp;and&nbsp;[charger](https://www.adafruit.com/products/1304)
- [Soldering tools and supplies](../../../../adafruit-guide-excellent-soldering)
- double sided foam tape or velcro tape (optional)
- Headband or bandana
- needle and thread (optional)

For a similar&nbsp;circuit without haptic gestures (but with slightly smaller components), check out the&nbsp;[Gemma Mindfulness Bracelet](../../../../buzzing-mindfulness-bracelet)!

# Haptic Headband

## Solder Circuit

![](https://cdn-learn.adafruit.com/assets/assets/000/028/701/medium800/flora_haptic-headband-02.jpg?1448458001)

Solder four wire connections as follows:

- motor controller VIN -\> Flora 3.3V
- motor controller GND -\> Flora GND
- motor controller SCL -\> Flora SCL
- motor controller SDA -\> Flora SDA

![](https://cdn-learn.adafruit.com/assets/assets/000/028/702/medium800/flora_haptic-headband-03.jpg?1448458046)

Solder the vibtration motor to the + (red) and - (blue) on the motor controller.

![](https://cdn-learn.adafruit.com/assets/assets/000/028/703/medium800/flora_haptic-headband-01.jpg?1448458096)

Use a piece of double sided foam tape (or velcro tape) to affix the moto controller to the back of Flora, and plug in your battery.

# Haptic Headband

## Code

Upload the following code to your Flora using the Arduino IDE. Change the 'interval' variable to your desired timer. Requires the&nbsp;[DRV2605](https://github.com/adafruit/Adafruit_DRV2605_Library)&nbsp;library.

This basic code creates a variable&nbsp;delay between pulses-- adjust the 'interval' value to your liking.

For a more complex, power saving example, check out the [Gemma Mindfulness Bracelet](../../../../buzzing-mindfulness-bracelet).

```auto
/*
Basic timer circuit to trigger haptic motor controller at a specified interval.
Uses Flora and DRV2605L Haptic Motor Controller
Tutorial: https://learn.adafruit.com/haptic-headband
*/

#include &lt;Wire.h&gt;
#include "Adafruit_DRV2605.h"

Adafruit_DRV2605 drv;

uint8_t effect = 7;
uint32_t wait = 10; // Time between reminders, in seconds

void setup() {
  Serial.begin(9600);
  drv.begin();
  
  drv.selectLibrary(1);
  
  // I2C trigger by sending 'go' command 
  // default, internal trigger when sending GO command
  drv.setMode(DRV2605_MODE_INTTRIG); 
  
}

void loop() {
  Serial.print("Effect #"); Serial.println(effect);

  // set the effect to play
  drv.setWaveform(0, effect);  // play effect 
  drv.setWaveform(1, 0);       // end waveform

  // play the effect!
  drv.go();
    
    
    delay(wait * 60 * 1000);
    

}

```

# Haptic Headband

## Wear it!

![](https://cdn-learn.adafruit.com/assets/assets/000/028/704/medium800thumb/flora_haptic-headband-04.jpg?1448461626)

Plug in your battery, power Flora's switch ON, and roll up the circuit in a headband or bandana. Wear for timing your meditation, reminding you to check the laundry, etc.!


## Featured Products

### FLORA - Wearable electronic platform: Arduino-compatible

[FLORA - Wearable electronic platform: Arduino-compatible](https://www.adafruit.com/product/659)
FLORA is Adafruit's fully-featured wearable electronics platform. It's a round, sewable, Arduino-compatible microcontroller designed to empower amazing wearables projects.FLORA comes with Adafruit's support, [tutorials and...](http://learn.adafruit.com/category/flora)

In Stock
[Buy Now](https://www.adafruit.com/product/659)
[Related Guides to the Product](https://learn.adafruit.com/products/659/guides)
### Adafruit DRV2605L Haptic Motor Controller - STEMMA QT / Qwiic

[Adafruit DRV2605L Haptic Motor Controller - STEMMA QT / Qwiic](https://www.adafruit.com/product/2305)
The DRV2605 from TI is a fancy little motor driver. Rather than controlling a stepper motor or DC motor, its designed specifically for controlling **haptic** motors - buzzers and vibration motors. Normally one would just turn those kinds of motors on and off, but this driver has...

In Stock
[Buy Now](https://www.adafruit.com/product/2305)
[Related Guides to the Product](https://learn.adafruit.com/products/2305/guides)
### Vibrating Mini Motor Disc

[Vibrating Mini Motor Disc](https://www.adafruit.com/product/1201)
\*BZZZZZZZZZZ\* Feel that? That's your little buzzing motor, and for any haptic feedback project you'll want to pick up a few of them. These vibe motors are tiny discs, completely sealed up so they're easy to use and embed.  
  
Two wires are used to control/power the vibe....

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

[Lithium Ion Polymer Battery - 3.7v 150mAh](https://www.adafruit.com/product/1317)
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 150mAh for a total of about 0.6 Wh. If you need a larger battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1317)
[Related Guides to the Product](https://learn.adafruit.com/products/1317/guides)
### Adafruit Micro Lipo - USB LiIon/LiPoly charger

[Adafruit Micro Lipo - USB LiIon/LiPoly charger](https://www.adafruit.com/product/1304)
Oh so adorable, this is the tiniest little lipo charger, so handy you can keep it any project box! Its also easy to use. Simply plug in the gold plated contacts into any USB port and a 3.7V/4.2V lithium polymer or lithium ion rechargeable battery into the JST plug on the other end. There are...

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

## Related Guides

- [FLORA NeoGeo Watch](https://learn.adafruit.com/flora-geo-watch.md)
- [Flora Brake Light Backpack](https://learn.adafruit.com/flora-brakelight-backpack.md)
- [Flora-Powered TARDIS Costume (for Dogs!)](https://learn.adafruit.com/wearable-flora-powered-tardis-costume-dogs.md)
- [FLORA TV-B-Gone](https://learn.adafruit.com/flora-tv-b-gone.md)
- [Glowing Skullcandy Headphones Mod](https://learn.adafruit.com/glowing-skullcandy-headphones-mod.md)
- [STEAM-Punk Goggles](https://learn.adafruit.com/steam-punk-goggles.md)
- [Bunny Ears with MakeCode](https://learn.adafruit.com/bunny-ears-with-makecode.md)
- [Mailbox Notification Service](https://learn.adafruit.com/mailbox-notification-service.md)
- [Li-Ion & LiPoly Batteries](https://learn.adafruit.com/li-ion-and-lipoly-batteries.md)
- [Glue Stick Light Pipe Sculpture](https://learn.adafruit.com/glue-stick-archway.md)
- [Glowing Beehive Hairdo Wig](https://learn.adafruit.com/glowing-beehive-hairdo-wig.md)
- [NeoPixel Ring Clock](https://learn.adafruit.com/neopixel-ring-clock.md)
- [Chirping Plush Owl Toy](https://learn.adafruit.com/chirping-plush-owl-toy.md)
- [Glowing Scale Armor](https://learn.adafruit.com/glowing-scale-armor.md)
- [Han Solo Blaster Cosplay](https://learn.adafruit.com/han-solo-blaster-cosplay.md)
