Welcome to IoTForums.com Community
Register now to participate in discussions, ask questions and share your knowledge on internet of things and automation! Feel free to sign up today.
Register Now

IoT MQTT demo with DHT sensor RTL8195AM

Michael

Just Hatched
Jun 1, 2020
8
2
11
Singapore

Temperature and humidity are 2 of the most important factors affecting people’s comfort level in an enclosed space.
The DHT humidity and temperature sensor can read the ambient temperature and humidity every 2-3 seconds, and then pass the data to Ameba who will forward them to the server using MQTT protocol. Whoever “subscribing” to the right topic gets the data almost instantaneously. Users can then adjust the aircon mode or temperature according to the readings received.
An android phone was used as an MQTT client and the Ameba RTL8195 Dev. Board acted as another MQTT client communicating with the android phone. Both clients have to connect to the same MQTT server before proceeding to the next step.
The DHT sensor updates its data every 10 seconds to stay as accurate as possible. Once sensor data is received, Ameba then “publishes” the data to the MQTT server where all clients “subscribing” to the right topic gets the data displayed on the console.

Hardware_connection.jpg

GitHub source code:
Please, Log in or Register to view URLs content!

Official webs:
Please, Log in or Register to view URLs content!
 

Log in

or Log in using