Incompatible browser

The Public Laboratory website will not render correctly in Internet Explorer 6 or earlier. To view it properly, please use an up-to-date browser, such as Firefox, Chrome, or another standards-compliant browser. It's a good idea to upgrade anyways -- olderversions of IE pose a security risk for your computer.

Thermal Torch Code

This is the coding I have written for the thermal torch / thermal photography project - http://publiclaboratory.org/tool/thermal-photography

The circuit is simply the one shown at - http://publiclaboratory.org/notes/warren/12-12-2011/circuit-diagram-simp... - all I have done is change the program uploaded to the Arduino Uno board. Also note that I have the LED on pins 9, 10 and 11 (which is different from the previous link) and all temperatures are in degrees Celsius.

This colour scale for the temperatures is based on the sinebow colour wheel, which is discussed here http://basecase.org/env/on-rainbows

The code currently requires you to specify the lower and upper temperatures (20 and 30oC in this example) before you upload it, which is then mapped onto the colour wheel from 300o to -30o (purple to pink). Which essentials means that the same colour scale is used and mapped onto the temperature range that you specify in the code.

Code:

Login or register to tag items

Comments

Sara's picture

Hey this is awesome! Thanks. Could you share some kind of step by step how to?

dr_dbw's picture

This is just using the circuit etc that has been posted here, I will make the explicitly clear in the text in a moment. So I don't really have a step by step to add. Or is there something specific you are after? i.e. how the colour mapping is done onto the temperature scale, may be?

The code does something similar to what Jeff has written, I think? However, you are able to specify the minimum and maximum temperatures and then the colour output will be adjusted to suit. Suppose you can call it dynamic scaling. It is not fixed in the manner that is discussed here - http://publiclaboratory.org/notes/warren/2-16-2012/thermal-flashlight-te...

I plan to make it so that you can flick a switch to change the minimum temperature between two values, and then a second switch to change the maximum temperature. Hope to use that so that limit the times that have to connect and recode the Uno board. At a guess the selectable temperatures will probably be 10 & 15 and 25 & 30, but will have to see. Will probably depend on the season etc. When I do that, I will put up full details on what I have done, plans etc.

If someone can tell me the coding to use on the page to make the Arduino code to appear as it has for others like Jeff, that would be great.

dr_dbw's picture

Probably should say why I want to be able to dynamically change the colouring scale. Basically, want to use the entire colour scale in the situations in which it is used. This will make it much clearer the temperature differences that occur.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Link to content with [[some text]], where "some text" is the title of existing content or the title of a new piece of content to create. You can also link text to a different title by using [[link to this title|show this text]]. Link to outside URLs with [[http://www.example.com|some text]], or even [[http://www.example.com]].

More information about formatting options

To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.