{"action":"opened","issue":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/225","labels_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/225/comments","events_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/225/events","html_url":"https://github.com/nodemcu/nodemcu-firmware/issues/225","id":57751323,"number":225,"title":"Problems with DHT22 library and 2015-02-13 binary","user":{"login":"robcazzaro","id":7785421,"avatar_url":"https://avatars.githubusercontent.com/u/7785421?v=3","gravatar_id":"","url":"https://api.github.com/users/robcazzaro","html_url":"https://github.com/robcazzaro","followers_url":"https://api.github.com/users/robcazzaro/followers","following_url":"https://api.github.com/users/robcazzaro/following{/other_user}","gists_url":"https://api.github.com/users/robcazzaro/gists{/gist_id}","starred_url":"https://api.github.com/users/robcazzaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robcazzaro/subscriptions","organizations_url":"https://api.github.com/users/robcazzaro/orgs","repos_url":"https://api.github.com/users/robcazzaro/repos","events_url":"https://api.github.com/users/robcazzaro/events{/privacy}","received_events_url":"https://api.github.com/users/robcazzaro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-15T23:20:25Z","updated_at":"2015-02-15T23:20:25Z","closed_at":null,"body":"I was using 2015-01-26 binary (prebuilt binary, didn't recompile anything) and started using the DHT22 library, which works very reliably. \r\n\r\nUpdated to 2015-02-13, and updated the library to use floating point. But I started noticing a high rate of checksum errors (roughly 30-40% of the reads result in a checksum error). Went back to 2015-01-26 and, with the same library (the new one, compatible with both floating point and integers) and the exact same code, I can read the DHT22 very reliably, not a single checksum error in 50 tries\r\n\r\nIt looks as if the timing of the loops reading the DHT22 signal is slightly off, somehow. I know it's not a float math error, because when the checksum is off, either the temperature or humidity reading (usually humidity) is off significantly (i.e. while reading 45% humidity with the right checksum, might read 20% humidity when the checksum is off). I did put extra print() statements in the DHT22 library to see the values being read, btw, and not relying on the values returned by the function (which sets humidity to nil when the checksum is off)"}}