Introduction: NO NOD - Vibration Hat to Wake You Up

Hey guys, Is it hard to wake up in the class?

Don’t you find yourself keep nodding?

Put this NONOD HAT on! This hat can be a answer!

Control your sleep!

Step 1:

Step 2: Prepare All the Materials

-Arduino Uno

-Accelerometer sensor

-Adafruit Feather 32u4

-Haptic Headband DRV2605

-Small battery

-Vibrating motor

-Wires,soldering iron

-Cap or hat

Step 3: Step 2: Mount the Accelerometer Sensor to a Small Breadboard

Plug your accelerometer into your breadboard and get it working on your arduino uno (from your kit) as per this tutorial https://learn.adafruit.com/adafruit-lis3dh-triple...

Step 4: ​Step 3: Wiring & Test

You can easily wire this breakout to any microcontroller, we'll be using an Arduino. For another kind of microcontroller, as long as you have 4 available pins it is possible to 'bit-bang SPI' or you can use two I2C pins, but usually those pins are fixed in hardware. Just check out the library, then port the code.

I2C Wiring

Use this wiring if you want to connect via I2C interface

- Connect Vin to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V

- Connect GND to common power/data ground

- Connect the SCL pin to the I2C clock SCL pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A5, on a Mega it is also known as digital 21 and on a Leonardo/Micro, digital 3

- Connect the SDA pin to the I2C data SDA pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A4, on a Mega it is also known as digital 20 and on a Leonardo/Micro, digital 2

https://learn.adafruit.com/haptic-headband

Step 5: ​Step 4 Download Files

To begin reading sensor data, you will need to download Adafruit_LIS3DH / Adafruit_Sensor from Adafruit website (http://adafru.it/jzb).

Step 6: ​Step 5. Play With Accelerometer

Go to serial monitor and check the x.y.z number annd find the zChange > 2000.

Step 7: ​Step 6. Solder Circuit (Haptic Headband)

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://learn.adafruit.com/downloads/pdf/adafruit-...

Step 8: ​Step 7. Code

Upload the following code to your Flora using the Arduino IDE. Change the 'interval' variable to your desired timer.Requires the DRV2605 (http://adafru.it/eh0) library. This basic code creates a variable delay between pulses-- adjust the 'interval' value to your liking. For a more complex, power saving example, check out the Gemma Mindfulness Bracelet (http://adafru.it/jDC)

Step 9: ​Step 8. Combine Two Codes

Once you have both of those(Accelerometer and Haptic Headband) examples working, you can write code to combine them.

Step 10: ​Step 9. Combine Two Sensors and Flora

After you combine two sensors with flora, You can put them in your hat!

Step 11: Control the Waveform Effects

When you are ready to place the full waveform sequence, send the go() command!

You are finished!!