NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Blinking an LED - Why remove the temperature sensor

April 24, 2012
by jlaskowski
jlaskowski's Avatar

Why does The Nerdkits Guide require the removal of the temp sensor to get the LED to blink? Is the concern the power draw from the 9V battery? If so, if I'm using a large 12V battery, any reason I can't leave it in?

April 25, 2012
by Ralphxyz
Ralphxyz's Avatar

You can leave it on the breadboard but if you do you have to modify the code to blink the led relative to the temperature.

Ralph

April 25, 2012
by jlaskowski
jlaskowski's Avatar

Why is that? Can't I have the LED connected to a pin that I turn on and off programmatically, indpendently of the temp sensor?

April 25, 2012
by Ralphxyz
Ralphxyz's Avatar

I was just kidding ;-)

Your question was why was it removed in the tutorial, that was just to get it out of the way.

But if you think about it varying the LED by temperature would be a good "next step".

Once you get the led to blink and you have the tempsensor working try this.

Real rough pseudo code:

Get temp
loop
If temp > 70˚ 
then turn on led for 20ms
turn off led
if temp < 70˚
turn on led for 60ms
turn off led

That would be a good exercise and once you know how to run the temp sensor and blink a led you know how to do it!

Ralph

Post a Reply

Please log in to post a reply.

Did you know that an analog comparator can tell when one voltage input crosses another? Learn more...