My reindeer hat was featured on the 1/7/2015 episode of Wearable Wednesday!
Showing posts with label Rudolph. Show all posts
Showing posts with label Rudolph. Show all posts
Thursday, January 8, 2015
My hat was on Wearable Wednesday yesterday!
Tuesday, December 30, 2014
Temperature Sensing Hat
In my last post, I shared my first completed eTextile, a hat that plays Rudolph the Red-Nosed Reindeer in sync with his flashing nose! After quite a bit of trial and error, I added a temperature sensor and got my hat working the way I want it to! Figuring out the code for this sensor wasn't entirely intuitive.
For example, I wanted the buzzer music to come on when the temperature dipped well below room temperature. When trying to figure out the code for the temperature sensor, I spent a lot of time writing things like:
if(sensorValue <=155)
For example, I wanted the buzzer music to come on when the temperature dipped well below room temperature. When trying to figure out the code for the temperature sensor, I spent a lot of time writing things like:
if(sensorValue <=155)
and if(sensorValue <=100)
and if(sensorValue <=50)
The >= sign doesn't seem to mean GREATER than in this case, because when the temperature goes DOWN, my music comes on. I would like to understand this better.
By using the Arduino Serial Monitor, I'd determined that the ambient temperature of my room equated to approximately 157 (I don't yet know how that translates to degrees in Fahrenheit). I thought that using the <= sign would tell the LilyPad that I wanted it to trigger the music when the temperature went down. This was NOT the case.
The correct way to achieve the result I was after actually looks like this:
if(sensorValue >=155)
The >= sign doesn't seem to mean GREATER than in this case, because when the temperature goes DOWN, my music comes on. I would like to understand this better.
In any case, when I wear my hat indoors the lights flash, but the music doesn't come on unless the ambient temperature is pretty chilly. The beauty of this is that the music should only come on when I'm outside, away from the delicate nerves of my loved ones (or to signal our need to heave another log onto the family hearth).
Here is a link to the code that I wrote (some of which has been modified from an Ugly Christmas Sweater Instructable).
Sunday, December 14, 2014
Rudolph Hat...a work in progress.
Please click on the following link to read the post that I just wrote on my personal blog. Leah, I'm not sure, but I think I may have accidentally discovered why your speakers aren't loud enough.
Subscribe to:
Posts (Atom)
