Introduction: Arduino Led Strip Responsive Heart Rate Sensor
The first thing i did was connecting my Grove Heart rate sensor to my Arduino via a very easy to follow tutorial on YouTube.
Step 1: Add a Script for the Heart Rate Sensor
The YouTube link provided in the previous slide also references to a script you can copy paste in your Arduino script.
Now you can tweak numbers such as how often per second it returns a value of your current heart rate.
Step 2: Connecting Your LED Strip
After you have your Heart rate sensor up and running it's time to add your LED lights into your project.
To get the test script for your LED(ws2812) you want to go to the top bar and go to Tools>Manage Libraries, and search "Adafruit NeoPixel" and download it. From there you can go to File>Exampled>Adafruit NeoPixel and pick a test script of your liking.
Now to connect your red and black wires to the GRN and 5V in your black board. Then you connect your yellow wore in the slot your script wants you to put it in which is 6 in the test script by default.
Step 3: Test and Tweak
Now you have both of your components working at the same time, it's time to make them work together.
First you have to take the integer that the Heart rate sensor puts out (c) and make the LED strip be able to read it via an if else statement included in the images.
Now when the heart beat sensor gives variables <60 the light is blue. When it's <85 the LED turns green and when it's >85 it turns red.
I tested it out on my classmates myself and found that a lot of them have a regular heart rate just above 80 so i decided to put the threshold at 85. This might differ from person to person and also depends on what age your audience is going to use it, i recommend you greatly to try it on people yourself so you can also catch their responses to this product.
Step 4: Solder Your Breadboard Connections to a Copper Breadboard
When you're done with tweaking you will want to solder some wires down since you don't want your wiring to come loose while people are using it. This soldering is very easily done and also takes up very little space which comes in handy for the housing.
You will want to use the wires you have been using the entire time since they're a lot sturdier than others. Place the wires you had in your breadboard and place them into the copper one, having all the red and black wires in separate rows. Now cut in the resistance and volt wires from the spool and place them in their respected rows (red in the red row and grey in the black row). Now solder both rows in separate lines, attaching all the wires in each row and now they are all connected to each other. Now place the loose end of the red wire in the 5v slot and the grey wire in the GND slot.
Step 5: Attach Your LED Strip to the Heart
And at last you can glue your LED strip the the back of the heart to get this cool looking glow effect from the back of the heart.