{"id":1597,"date":"2017-08-07T09:42:42","date_gmt":"2017-08-07T00:42:42","guid":{"rendered":"http:\/\/research.itplants.com\/?p=1597"},"modified":"2017-08-07T09:52:07","modified_gmt":"2017-08-07T00:52:07","slug":"tsl2561","status":"publish","type":"post","link":"https:\/\/research.itplants.com\/?p=1597","title":{"rendered":"TSL2561"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/janheise\/TSL2561\">https:\/\/github.com\/janheise\/TSL2561<\/a> \u306b\u3042\u308b\u3001TSL2561.example.py\u306b\u306f\u30d0\u30b0\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Gain\u309216\u500d\u3057\u3066\u3044\u308b\u306e\u3067\u3001Lux\u306e\u8a08\u7b97\u3067\u306f\u30011\/16\u306b\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>#!\/usr\/bin\/env python3<br \/>\nfrom TSL2561 import *<br \/>\ntsl = TSL2561()<br \/>\nif tsl.foundSensor():<br \/>\n#print(&#8220;Found sensor&#8230;&#8221;)<br \/>\n#tsl.setGain(tsl.GAIN_1X);<br \/>\ntsl.setGain(<strong><span style=\"color: #00ff00;\">tsl.GAIN_16X<\/span><\/strong>);<br \/>\ntsl.setTiming(tsl.INTEGRATIONTIME_13MS)<br \/>\nx = tsl.getFullLuminosity()<br \/>\n#print(&#8220;Full luminosity value: \n#print(&#8220;Full luminosity value: \nfull = tsl.getLuminosity(tsl.FULLSPECTRUM)<br \/>\nvisible = tsl.getLuminosity(tsl.VISIBLE)<br \/>\ninfrared = tsl.getLuminosity(tsl.INFRARED)<br \/>\nprint(&#8220;IR: \nprint(&#8220;Full: \nprint(&#8220;Visible: \nprint(&#8220;Visible, calculated: \nprint(&#8220;Lux: \nelse:<br \/>\nprint(&#8220;No sensor?&#8221;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/github.com\/janheise\/TSL2561 \u306b\u3042\u308b\u3001TSL2561.example.py\u306b\u306f\u30d0\u30b0\u304c\u3042\u308a\u307e\u3059\u3002 Gain\u309216\u500d\u3057\u3066\u3044\u308b\u306e\u3067\u3001Lux\u306e\u8a08\u7b97\u3067\u306f\u30011\/16\u306b\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 &#8230;<\/p>\n<p><a class=\"more\" href=\"https:\/\/research.itplants.com\/?p=1597\"> Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/1597"}],"collection":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1597"}],"version-history":[{"count":1,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/1597\/revisions"}],"predecessor-version":[{"id":1598,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/1597\/revisions\/1598"}],"wp:attachment":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}