Arduino BLE Temperature/Humidity Logger With DHT11 and IOS Display
11571 Views, 35 Favorites, 0 Comments
Arduino BLE Temperature/Humidity Logger With DHT11 and IOS Display

In this project we will build a simple temperature/humidity data logger based on BlueDuino R2 and display on iOS. It's easy to build and keep small size.
Materials


The BlueDuino Rev2 is an Arduino compatible microcontroller development board based on the ATmega32U4 IC with BLE module CC2540 built in.
- 1 x BlueDuino Rev2
- 1 x DHT-11 sensor, bought from eBay or Taobao
- 1 x LED power casing XS-621 56mm x 31mm x 20mm, bought from Taobao
- 1 x lithium battery, bought from eBay or Taobao
- A Soldering iron
- Some male pins
Wires Together



Pinouts for DHT-11
- Pin 1 VDD Power supply 3 - 5.5 V DC
- Pin 2 DATA Serial data output
- Pin 3 NC Not connected
- Pin4 GND Ground
Wiring:
- DHT11 BlueDuino
- Pin 1 -> Vcc
- Pin 2 -> 21
- Pin 4 -> Gnd
I also soldering a male pins for plug the battery.
Wire battery red pin -> BlueDuino pin raw, battery black pin -> BlueDuino pin GND.
Note: Please check the battery wires.
Arduino Setup and Sketch
The BlueDuino built-in a BLE module. The module can advertising as a iBeacon device. The below sketch will do these things.
- Make the BLE module work as peripheral mode and keep advertising.
- Set the proximity UUID to 06742A694C2C4359BBFE122D05B6DCBF in normal mode, set the major as the sensor id. We can monitor multiple sensor in same times without BLE connection.
- Set the proximity UUID to E2C56DB5DFFB48D2B060D0F5A71096E1 when advertising temperature/humidity sensor data.
The Arduino setup:
- Plug the BlueDuino R2 to PC
- Open Arduino IDE, choose the board LilyPad USB and right port
- Install the AB_BLE library to Arduino
- Upload the dht11Logger sketch
The IPhone App Example Code

We have add an example code BLETemperatureLogger-iOS to get the sensor datas. It can read multiple sensor in same time.
You should compile it with Xcode and install to you iPhone.
Put All in the Casing


Put all components in the casing.