{"id":1588,"date":"2015-09-26T08:10:26","date_gmt":"2015-09-26T07:10:26","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=1588"},"modified":"2015-09-26T08:10:26","modified_gmt":"2015-09-26T07:10:26","slug":"project-136-thermal-imager-project-update-9-flir-lepton-arduino-due-success","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/project-136-thermal-imager-project-update-9-flir-lepton-arduino-due-success\/","title":{"rendered":"Project 136: Thermal Imager Project Update 9: FLIR Lepton + Arduino Due: Success!"},"content":{"rendered":"<p>I have succeeded in interfacing with the Flir Lepton using the Arduino Due! I can now capture images from it.<\/p>\n<p>I actually had implemented code that was almost working (that I obtained from the <a href=\"https:\/\/groups.google.com\/forum\/#!forum\/flir-lepton\">Flir Dev Kit&#8217;s Google Group<\/a>). But I could not understand it&#8217;s output values, so I decided to write a test program from scratch, which did not succeed in getting usable data from the lepton.<\/p>\n<p>Thanks to the support of the Google group, I learned that the Lepton sends blank values when it is &#8220;busy&#8221; that have to be discarded, this was the reason why I was getting so many zeros from the Lepton.<\/p>\n<p>In addition to this, the Lepton does not output temperature values in the operating range of the device, which is what I thought. It outputs raw numerical data, which needs to be sampled and converted into values between 0 and 255, and finally these values can then be rendered.<\/p>\n<p>I have still got a lot of work to do on this project, such as bug fixes, video support, and the permanent mounting of the hardware.<\/p>\n<p>The next thing to do is to create the &#8220;heat map&#8221; by converting the heat information from the Lepton into an RGB colour value. This should\u00a0 increase the quality of the image. I have found some source code to do this. I will also implement some interpolation to increase the resolution of the image.<\/p>\n<p>At the moment I am writing the data out to a file on my PC using the serial port, and then opening that file with Processing and rendering the image. The finished project will feature the TFT screen to render the image, and an onboard SD card\u00a0 to store it for later additional processing or viewing on a computer.<\/p>\n<p>The data is stored in raw format at the moment (just a list of temperature values) but in future I could add the ability to convert that raw data to .JPG&#8217;s or .BMP&#8217;s.<\/p>\n<p>This is a picture of me. You might have to use your imagination a bit on it, due to the low resolution of the image!<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment09-Sep.-26-04.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1581\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment09-Sep.-26-04.41-300x236.jpg\" alt=\"PhoenixGameDevelopment09 Sep. 26 04.41\" width=\"300\" height=\"236\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment09-Sep.-26-04.41-300x236.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment09-Sep.-26-04.41.jpg 646w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Another picture of me.<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment12-Sep.-26-04.52.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1569\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment12-Sep.-26-04.52-300x236.jpg\" alt=\"PhoenixGameDevelopment12 Sep. 26 04.52\" width=\"300\" height=\"236\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment12-Sep.-26-04.52-300x236.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment12-Sep.-26-04.52.jpg 646w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Me again, using just the Red Colour Channel.<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment11-Sep.-26-04.46.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1568\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment11-Sep.-26-04.46-300x236.jpg\" alt=\"PhoenixGameDevelopment11 Sep. 26 04.46\" width=\"300\" height=\"236\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment11-Sep.-26-04.46-300x236.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment11-Sep.-26-04.46.jpg 646w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This is me holding a candle. The FLIR Lepton autoscales it&#8217;s temperature values according to the hottest temperature values that are visible, this is likely the reason why the colour seems &#8220;washed out&#8221;.<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment15-Sep.-26-04.58.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1572\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment15-Sep.-26-04.58-300x236.jpg\" alt=\"PhoenixGameDevelopment15 Sep. 26 04.58\" width=\"300\" height=\"236\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment15-Sep.-26-04.58-300x236.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment15-Sep.-26-04.58.jpg 646w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This is a relatively good image of my hand.<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment08-Sep.-26-04.38.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1580\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment08-Sep.-26-04.38-300x236.jpg\" alt=\"PhoenixGameDevelopment08 Sep. 26 04.38\" width=\"300\" height=\"236\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment08-Sep.-26-04.38-300x236.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment08-Sep.-26-04.38.jpg 646w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Another picture of my hand.<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment04-Sep.-26-03.38.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1576\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment04-Sep.-26-03.38-300x236.jpg\" alt=\"PhoenixGameDevelopment04 Sep. 26 03.38\" width=\"300\" height=\"236\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment04-Sep.-26-03.38-300x236.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2015\/09\/PhoenixGameDevelopment04-Sep.-26-03.38.jpg 646w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have succeeded in interfacing with the Flir Lepton using the Arduino Due! I can now capture images from it. I actually had implemented code that was almost working (that I obtained from the Flir Dev Kit&#8217;s Google Group). But I could not understand it&#8217;s output values, so I decided to write a test program [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,12],"tags":[],"class_list":["post-1588","post","type-post","status-publish","format-standard","hentry","category-inventions","category-tutorials","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1588"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=1588"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1588\/revisions"}],"predecessor-version":[{"id":1589,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1588\/revisions\/1589"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=1588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=1588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=1588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}