+21622886281
App Inventor Arduino DHT11 Project

Display the temperature measured by DHT11 sensor in smartphone

Sending data from an Arduino to a smartphone via Bluetooth

To send data from an Arduino to a smartphone via Bluetooth, you will need a Bluetooth module, such as the HC-06, and a smartphone with Bluetooth capabilities. Here is a general overview of the process:

  1. Connect the HC-06 Bluetooth module to the Arduino. The module should be connected to the Arduino‘s serial pins (RX, TX) and powered by the Arduino‘s voltage supply.
  2. Upload a sketch to the Arduino that sends data via the serial connection. You can use the Serial.begin() and Serial.print() functions in Arduino to send data from the Arduino to the HC-06 module.
  3. Pair the HC-06 module with your smartphone. On your smartphone, go to the Bluetooth settings and search for available devices. Once the HC-06 is found, pair with it using the default password “1234” or “0000”
  4. Use a software or an application on your smartphone that can receive the data sent by the Arduino. One of the most common one is the “Serial Bluetooth Terminal” this app allows you to see the data sent by the Arduino.
  5. Configure the software or app to receive data from the HC-06 module.
  6. Once everything is set up, the Arduino should be able to send data to the smartphone via the HC-06 Bluetooth module. The data can be displayed on the smartphone‘s screen or used to control other functions on the smartphone.

Purpose of this tutorial:

To send temperature data measured by a DHT11 sensor from an Arduino to a smartphone via Bluetooth, you will need the following components:

  • DHT11 temperature and humidity sensor
  • HC-06 Bluetooth module
  • Arduino board
  • Jumper wires
  • Smartphone with Bluetooth capabilities
  • A software or an application on your smartphone that can receive the data sent by the Arduino.

Here is a general overview of the process:

  1. Connect the DHT11 sensor to the Arduino. The DHT11 sensor should be connected to the Arduino‘s digital pins and powered by the Arduino‘s voltage supply.
  2. Connect the HC-06 Bluetooth module to the Arduino. The module should be connected to the Arduino‘s serial pins (RX, TX) and powered by the Arduino‘s voltage supply.
  3. Upload a sketch to the Arduino that sends temperature data via the serial connection. You can use a library such as the DHT library to read the data from the DHT11 sensor and the Serial.begin() and Serial.print() functions in Arduino to send the data to the HC-06 module.
  4. Pair the HC-06 module with your smartphone. On your smartphone, go to the Bluetooth settings and search for available devices. Once the HC-06 is found, pair with it using the default password “1234” or “0000”
  5. Use a software or an application on your smartphone that can receive the data sent by the Arduino. One of the most common one is the “Serial Bluetooth Terminal” this app allows you to see the data sent by the Arduino.
  6. Configure the software or app to receive data from the HC-06 module.
  7. Once everything is set up, the Arduino should be able to send temperature data measured by the DHT11 sensor to the smartphone via the HC-06 Bluetooth module. The data can be displayed on the smartphone’s screen or used to control other functions on the smartphone.

In this tutorial we will see how to send the temperature value of the DTH11 sensor to the smarthpone via bluetooth.

This is why we are going to create two programs: a mobile application with App Inventor for the smartphone and a program for the Arduino board.

Necessary components

Arduino UNO

The Arduino UNO is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button. It is commonly used for DIY electronics projects and for controlling a variety of devices. The board can be programmed with the Arduino IDE (Integrated Development Environment) software, which is a simple programming language based on C/C++.

HC-06 Bluetooth module

The HC-06 Bluetooth module is a small, inexpensive device that allows for wireless communication between electronic devices using the Bluetooth protocol. It can be used to connect microcontrollers such as an Arduino to a smartphone or computer, allowing for wireless control or data transfer.

The HC-06 module operates as a slave device and can be configured to work with a wide range of baud rates. It can be powered by a voltage between 3.3V and 6V and consumes very low power. It supports both AT and transparent transmission mode.

It can be easily interfaced with microcontroller using UART communication. The HC-06 module can be used to implement wireless control and monitoring of various electronic projects, and it can be easily integrated into existing projects to add wireless functionality.

DTH11 sensor

The DHT11 is a low-cost temperature and humidity sensor that can be used to measure the ambient temperature and humidity in a given environment. It is commonly used in home automation and weather station projects.

The DHT11 sensor has three pins: Vcc, Gnd, and Data. The Vcc pin should be connected to a 3-5V power source, the Gnd pin should be connected to ground, and the Data pin should be connected to a digital input pin on a microcontroller such as the ESP32. The sensor uses a single-wire communication protocol to send the temperature and humidity data to the microcontroller.

The DHT11 sensor can measure temperature in the range of 0-50°C (32-122°F) with an accuracy of ±2°C (±4°F) and humidity in the range of 20-80% with an accuracy of ±5%. The sensor takes about 2 seconds to measure and update the data.

Test plate

A test plate is a type of device used in robotics to test the functionality and performance of various components or systems. It is typically a physical platform or structure that is designed to hold and support various test items or devices, such as sensors, actuators, motors, or other types of mechanical or electrical components. Test plates can be used to simulate different environments or conditions, such as temperature, humidity, vibration, or other factors, in order to evaluate the performance of the components or systems being tested. They can also be used to perform a variety of diagnostic or diagnostic tests, such as stress testing, endurance testing, or other types of evaluations.

Connecting wires

Wires are used to transmit electrical signals and power to various components such as motors, sensors, and microcontrollers. It’s important to properly route and secure the wires to prevent tangles and damage. There are several methods for doing this, including using cable ties, clamps, and wire looms. It’s also a good idea to use different colors or labeling to identify the different wires and their functions. When connecting wires in a robot, it’s important to follow proper safety procedures, such as using the correct wire stripper and connectors, and wearing protective equipment such as gloves and safety glasses.

Mounting

Program

Here is the program that allows you to connect the Arduino board to the smartphone and send a message containing the temperature value measured by the DHT11 sensor via bluetooth.

Creation of the application with App Inventor:

We will create a mobile application named ‘temperature_arduino’ with App Inventor which allows you to receive a message from the Arduino board.

We propose to create the design of the application, with the following visual:

Programming with App Inventor

To program the application, App Inventor offers us to use the Blocks space, which allows you to create a program in the form of a block diagram. Very easy to use but requiring a little programming logic.

Here is the program of the application created in the Blocks area of ​​the Inventor App:




3 commentaires

lee 08-11-2222

i've got " Compilation error: dht11.h: No such file or directory" . kindly help

Med Ali 08-11-2222

you need imorpt dht11 librairy from Internet

Wilma 22-10-2222

Excellent blog you have got here.. It's hard to find high-quality writing like yours nowadays. I really appreciate individuals like you! Take care!!


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top