chipKIT® Development Platform

Inspired by Arduino™

Humidity and Temperature with DHT22, UBW32, and MPIDE

Created Sun, 08 Apr 2012 20:23:36 +0000 by Iliah Borg

Iliah Borg

Sun, 08 Apr 2012 20:23:36 +0000

Got a batch of sensors that refused to work reliably with Arduino libraries I tried. After several hours of use the sensors stopped responding. I suspected a timing problem and decided it is a good time to try pic32 and MPIDE.

Resulting commented code

Yellow is the train from the sensor (first part of it visible) Cyan peak marks the sensor acknowledgement window as recognized in the code Purple peaks indicate bits recognized as "1s"