Dotklok + LM35 Temperature Sensor

I got my Dotklok up and running some days ago, I am really enjoying it on my room.
But I want to do more with it. Too bad right now I don’t have much time to play with electronics and build cool things.

Anyway, today I decided to spend some time learning the Dotklok’s code and add a temperature sensor to it. The result was really cool, and now I am sharing the bit of code I added to the clock.

To make it work in your clock, you must add a new effect called temperature(); in the switch area, then in
time animations, add the code below. And for the hardware, I used a LM35 Temperature Sensor connected in 5V, GND, and AD3, but can use any AD available, just change the code afterwards.

Here is the code, but you can check the RAW file too.

Some more pics and video.


What do you think?
If you modify the code, don’t forget to share!

Thanks for reading!

8 comments on “Dotklok + LM35 Temperature Sensor

  1. Igor June 9, 2011 10:52 pm

    Oi Daniel, vc ainda tem algum PCB dele sobrando pra vender?

  2. DanielAndrade June 11, 2011 5:10 pm

    @Igor tenho sim, entra em contato comigo por email. Valeu

  3. Kevin February 15, 2012 8:05 am

    Hi Daniel,
    The temperature sensor is a great addition to the Dotklock. I am very new to the Ardunio and although i have the new 1.5 code up and running i’m a little confused on where to install the code for this new hardware. Any help would be greatly appreciated.
    Regards,
    Kevin

  4. Andrio March 19, 2012 3:02 am

    Can i control any device while reading the temperature? I mean while reading the temperature for example when i get 20c i want to turn on the heating device

  5. Andrio March 19, 2012 3:02 am

    Can i control any device while reading the temperature? I mean while reading the temperature for example when i get 20c i want to turn on the heating device

    • DanielAndrade March 19, 2012 11:54 am

      Sure you can do that!
      You have to set a flag when the temperature reaches like 20c if turn a fan, a transistor or whatever you want to turn on. 😉

  6. Kevin March 19, 2012 6:35 pm

    Hi, What software version did you use when you install the temp sensor code?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.