For this week the assignment was to code and develop a smart device using Arduino Uno and tinker cad, and Arduino IDE for the code and implement the circuit in real life with an enclosure made of cardboard
I decided to modify week6 project by adding DHT sensor and Led with and enclosure for smart home or office
5V Adaptor to power the arduino
Bread Board.
Arduino UNO.
Ultrasonic Sensor
Buzzer
DHT sensor
LED
Jumper wires.
USB Cable.
inputs are Ultrasonic sensor and DHT sensor
output are buzzer and led
inputs:1- ultrasonic sensor has 4 pins (vin on volt / ground pin /tigger on pin 2 on arduino / echo on pin 4 on arduino )
2-temprature sensor act as DHT sensor has 3 pins 1 for volts 2 for ground and 3rd pin on A5 on ardunio as an analogue input.
out put: 1-bazzer has 2 pins ( pin 6 on Arduino ( analogue output ) and ground)
2-led has 2 pins one on pin 7 on arduino as digital output and the other pin on ground
the ground is the same in the whole circuit
after making the circuit on tinkercad i wrote the code on the arduino IDE before uploading it on the arduino
powering arduino by 5 volt adaptor on5v arduino and the the ground pin
the ground is the same for the whole circuit
first i started by downloading the DHT library to be able to call it in my code and define variables
here the DHT sense the temperature and put it in t as a float variable
the condition is when the ultra sonic detects object in 20 cm distance or the DHT sense 30 degree the bazzer gives alarm and the led is on
i used a serial monitor to know the temperature changing
here is the final step and the project showes when the ultrasonic detect object or the DHT sense temperature 30 or more the bazzer give alarm and the led is on
i thought that the DHT sensor isnt working and i asked Israa ( the instructor ) she told me that the sensor take time to take the signal because of the senstivity
with the serial monitor i found out the room temperature is 25.3 degree so i used hot water to encrease the temperature and then i find that the sensor works very well
Really, what I learned this week will help me greatly in programming my final project as it already includes more than one output.
This week was full of skills and knowledge and I learned a lot as follows:
Understanding the Arduino code structure and syntax
Concept of variables and data types.
Loops and if condition.
Functions.