Some time ago a updated a DHT22 library posted at AVRFreaks forum. That lib returned float values which inplies that the AVR-GCC added a very large library. The code size was above 2kB.
With this update, float number is not needed anymore and the lib returns the integral and decimal parts of the values in a defined struct format. Is needed, the user can configure the lib to return raw values from the sensor. Code size now is only around 300 bytes.
Showing posts with label ATmega. Show all posts
Showing posts with label ATmega. Show all posts
Tuesday, January 14, 2014
DHT22 Interrupt Driven library for AVR
This lib can read temperature and humidity of a DHT22 sensor without blocking the microcontroller with unnecessary delay functions.
The lib is interrupt driven, all the timing measurements of sensor signal is done with a timer and a external interrupt using a state machine.
This way, you can use this lib with multiplexed displays without flicker the display during the measurement of the sensor data.
I hope this lib can be useful to someone.
This way, you can use this lib with multiplexed displays without flicker the display during the measurement of the sensor data.
Subscribe to:
Posts (Atom)