The assignment of this week is Build and Program a smart device that perform a certain function or solve a problem using an Arduino UNO at least two input and two output by using Arduino C (Text Code).
First, I was interested to do something like my final project which it is a laptop cooler. then I decided to make it with the final circuit by using cardboard to test my self and my ability to do my final project and also to saving time during the two weeks of the final project .
Software:
Tinkercad
To test my circuit to make sure that it is works without any problem and simulate it
Arduino IDE
to write the code and upload to the Arduino
Machine: ..............
Materials:
Cardboard
Wax
By searching for more ideas
Sketching a free hand design with pen and paper
Detect the cardboard Parts
Create new circuit
Detect the components needed Arduino, PIR sensor, Motor, Breadboard, Temperature sensor, led, resistor and relay ) and i used the the power supply and the relay to give the motor of the fan an external voltage with the Arduino volt to work
Insert the components and start connect (Wiring)
After wiring were finished, I start to coding and implement the design
Firstly, Start wiring the components as I did on the tinkercad
Secondly, open the Arduino IDE and then install the library of the DH11 sensor that define the type of the sensor and the reading pin, and then start to write the code and the conditions by:
define the constants
define the inputs and outputs in the setup loop
Serial print to see the sensor reading
write the conditions that if the tempurature is more than 25 c the fan will operate in the void loop
and if I put the laptop on the cooler the IR sensor will operate the led
Then upload the code to the Arduino
Thirdly, test the code with the components and the circuit
Fourthly, Start make the cardboard parts as shown in the sketch and make the body
< < Images > >
Fifthly, Install the components in the body
< < Images > >
At the end, Assembly the circuit with the cardboard body then test it
The final Output
I asked instructor Amany, when I wanted to use the temperature sensor in my final project, about her advice for which one I use , And she told me that there is big different between both and they will do the function
when I finish the code then upload to the Arduino and start test it does not work and the temperature read (non). I checked the wires and the sensor and I modified a lot in the code and it didn't work either
At the end I searched for the code for theDH11 sensor and found that the type of sensor is 11, and in my code is 22. after that it works.
I learned how to write the code that will control the process of the final project and the connections of the Arduino
The coolest thing that I have learned this week is how to write a code and I made the first code in my life and it is works
Title of Media