Professional Documents
Culture Documents
By: Lotfi Ben Abdelaziz Module : Architecture Atelier Arduino Duration : 1H 30min
objectives:
Tools:
1. Arduino Board
2. ESP32 Board
3. DHT22 Sensor
4. Connecting Wires
5. Bread Board
6. Arduino IDE
Introduction:
What is Arduino :
1
Figure 1 : Arduino Uno
The strength of Arduino is the simplicity of coding and understanding how it works,
plus there are tons of ready-to-use modules that exempt you from knowing much
about electronics.
Temperature sensor :
The DHT11 and DHT22 sensors are used to measure temperature and relative humidity.
These are very popular among makers and electronics hobbyists.
These sensors contain a chip that does analog to digital conversion and spit out a
digital signal with the temperature and humidity. This makes them very easy to use
with any microcontroller.The DHT22 sensor has a better resolution and a wider
temperature and humidity measurement range.
2
Figure 3 : DHT22 & DHT11 Pinout
The ESP32 is a series of low-cost and low-power System on a Chip (SoC) microcontrollers
developed by Espressif that include Wi-Fi and Bluetooth wireless capabilities and dual-core
processor. If you’re familiar with the ESP8266, the ESP32 is its successor, loaded with lots
of new features.
3
PART I : Arduino Basics
Exercise 1 :
Objective: Write a simple Arduino sketch to blink an LED connected to pin 13.
Instructions: Use the digitalWrite() function to turn the LED on and off at regular intervals
using delay().
Test:
To test your code using the schematic below for Arduino ,resistor and led. Please follow
these steps:
3. Document test results, observations, and improvements made during the testing
process.
4
Figure 6: Blink Schematic
Exercise 2 :
Objective: Create an Arduino sketch to generate a pattern of LED blinking using loops.
Instructions:
5
figure 6 : pattern of LED blinking using for loop
Exercise 1 :
Objective: Interface the DHT22 sensor with Arduino and read temperature and humidity
values.
Instructions: Use the DHT library to read sensor data and display it on the serial monitor.
6
Test:
Follow these steps to test your code using the provided schematic ( below) for Arduino
and DHT22:
First, you need to install the DHT library if you haven't already. You can do this by going to
Sketch > Include Library > Manage Libraries in the Arduino IDE, then search for "DHT" and
install the library.
4. Test the functionality of the DHT22 sensor by observing temperature and humidity
readings.
6. Document test results, observations, and improvements made during the testing
process.
7
Figure 7 : Arduino & DHT22 Schematic ( Fritzing software)
8
PART III: ESP82 Introduction.
Exercise 1 :
Objective: The ESP82 has capacitive sensors that can be used as a touch button. These are
the famous “TOUCH” pins found on the pinouts. Ten are available on the uPesy ESP82
boards.
9
Support :
10