User:Kmcgiver0970/snakehat

Write problem/project Goal
Come up with a final design for the snake hat and determine how it will responds to changing moods.

My First Task
Over the weekend I will look over the programs written on the arduinos and fimiliarize myself with what is happening with the LED light and heart beat sensor.

Summary of actual work over first weekend
Over the first weekend I investigated the previous groups program they wrote for determining heart rates and then proceeded to test how well the heart beat sensor worked with my heart beat.

Week1 Narrative
First I attached the heart beat sensor to my finger. The LED blinked sporadically, usually with the movement of either putting it on or taking it off my finger. Next, I tried to attach it to the bottom of my wrist to get a better reading but couldn't find a way to attach it. I had the same problem when trying to get a reading from my neck. Lastly, I ran in place to increase my heart rate and attached the sensor to my finger. This time the LED responded with rapid flickers. I concluded the program the previous group used works, but either needs modification or a better heart beat to go off of.

My Second Task
Over the weekend I will modify the existing program and load it onto the arduino. Also I will find a better spot on the body to attach the heart beat sensor for a stronger heart beat.

Summary of actual work over second weekend
Over the second weekend, I soldered a new connection to the heart beat sensor and I found a new program with an enhanced heart beat finding algorithm and uploaded it onto the arduino. The arduino now recognizes my heart beat consistently with me having to run in place first.

Week2 Narrative
First I cut off the existing connectors from the wires and soldered new connectors onto them so the wires could plug into the arduino more easily.

'''Before solder '''Cut and Strip '''Solder Wires '''Final Product

I also uploaded a new program onto the arduino with a more enhanced beat finding algorithm which can be found here. The actual code looks like this, in case you do not have the arduino environment available to you to upload the program into.

My Third task
Over the third weekend I will write a program that incorporates a button to differentiate which color the LED will light up.

Summary of actual work over third weekend
Over the weekend I wrote a simple program to light the color changing LED according to how many times the button was pressed.

Week3 Narrative
The first program I wrote can be found here. This program would not demonstrate the color changes of the LED as I had intended it to. After analyzing and reanalyzing the code, I realized that it could also be a hardware problem. I searched through arduino.cc to find how to properly use a button with an arduino. After some time, I realized I had the wires plugged into the wrong pins in the arduino. Similiarly, I also had the LED wires plugged into the arduino incorrectly.

With the arduino, the red wire goes into the 5V pin, the black wire goes right next to that into the ground pin, and the other short wire goes into whatever digital pin you want to use it with.

Similiarly, with the color changing LED, the black pin goes into the ground pin. The other three wires can go into whatever digital pins you want to use for your program.

'''Button and Color Changing LED

The arduino now responds to the button being pressed and the color chaning LED lights up and changes colors. I modified my program to account for the changing of the pins. The updated program can be found here. This program demsonstrates the different colors of the LED but still does not work correctly with how many times the button is pushed. The arduino responds to the button, and the LED cycles through all of its colors. Now it is defanitly a sofware issue.

My Fourth task
My fourth task will be to modify the existing program to get the color chaning LED to work correctly with the number of times the button is pushed.