TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle

Basic library for AM2301 (DHT21) temperature and humidity sensor - http://stm32f4-discovery.com/2014/08/library-25-am2301-dht21-sensor-stm32f4xx/. More...

Modules

 TM_AM2301_Macros
 Library defines.
 
 TM_AM2301_Typedefs
 Library Typedefs.
 
 TM_AM2301_Functions
 Library Functions.
 

Detailed Description

Basic library for AM2301 (DHT21) temperature and humidity sensor - http://stm32f4-discovery.com/2014/08/library-25-am2301-dht21-sensor-stm32f4xx/.

This library does not use any timers and interrupts to increase speed, only basic pooling mode.

Default pinout
AM2301      STM32F4xx       Description

VCC         3V3-5V          Supply voltage from 3V3 to 5V
GND         GND             Ground
DATA        PD1             Data line

By default, PD1 pin is used for data. If you want to change it, use lines below in defines.h to and edit them:

//Select custom pin for AM2301 sensor
#define AM2301_PORT             GPIOD
#define AM2301_PIN              GPIO_PIN_1
Data output

Temperature and humidity are returned from sensor in x10 multiplier, so like 55.5% humidity, sensor will return 555 and 27.3°C, sensor will return 273.

Note
This values are also returned from my library, you have to manually convert them (divide by 10)
Changelog
 Version 1.3
  - March 12, 2015
  - Added support for my new GPIO library

 Version 1.2
  - December 01, 2014
  - Added comments

 Version 1.1
  - November 28, 2014
  - Designed for new Delay system
 
 Version 1.0
  - First release
Dependencies
 - STM32F4xx
 - defines.h
 - TM DELAY
 - TM GPIO