Incompatible browser

The Public Laboratory website is designed for use in any browser except Internet Explorer. To view it properly, please use Firefox, Chrome, or another standards-compliant browser. Support for Internet Explorer is planned, but it's a good idea for you to get another browser anyways -- IE poses a security risk for your computer.

How are colors assigned to temperatures with the thermal flashlight?O

One problem frequently being encountered with the thermal flashlight is understanding how colors of light are assigned to particular temperatures. This is particularly confusing because the process of color mapping depends on weather one is working with a common cathode or common anode three color led.

The aspect of the code that controls color mapping reads:

  int hue = map(state,0,255,0,(360.00*0.60)); // not the whole color wheel

This function maps input to the arduino from the sensor (a value between 0 to 255) to a corresponding value on the color wheel. The color wheel has values from 0 (red) to 360 (red). Because we want our colors to move from red to green to blue, we only want to select the portion of the color wheel that contains those colors. If we used the whole color wheel then the lowest temperature in the range measured by the sensor and the highest temperature measured by the sensor would both result in red colored light. To avoid this problem we constrain the range of colors that values from the sensor can be mapped to. The value 0 sets the upper limit for color to red. The value (360.00*0.60) or 216 sets the lower limit for the color range to blue.

http://dba.med.sc.edu/price/irf/Adobe_tg/models/images/hsl_top.JPG

Login or register to tag items

Comments

warren's picture

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.