Title of Media
The idea of this project is not new. I modified the task of the fifth week to become a dual-mode fan, which can be controlled remotely using the IR sensor, and it can also be controlled manually through the potentiometer to control the speed of the motor. So this project will be as follows:
Inputs: IR Sensor and Potentiometer
Outputs: Running the fan and switching the color of the LED according to the mode"automatic or manual" and the speed of the motor.
As the red LED will emit during the automatic mode while the yellow and the green for the speed of the motor.
I used Arduino IDE to program the circuit.
Aristotle's triangle "You can use a ruler and protractor"
Compass.
Pencil.
Cutter blade.
Scissors.
Screwdriver.
Glue gun.
9V Adaptor.
Hobby Gearmotor.
Motor driver LM298N.
Bread Board.
Light Emitting DiodeS (LED).
Three 220 Ohm resistors.
Potentiometer.
IR Sensor HW-201.
Arduino Uno.
Jumper wires.
Crocodiles.
Adaptor Socket.
Firstly, I started to simulate my circuit using Tinker CAD.
Secondly, I started to build my circuit using the electronic components mentioned above to be ready for programming.
I started to write the code on Arduino code when I had finished the circuit wiring. There was a 2 inputs and 4 outputs as shown in the code.
In this part of the code, I had started to declare the variables and their data types when I set the pin modes as outputs and inputs in the field of (void setup).
In the field of (void loop), I used the IF Condition to control the motor according to the analog and digital inputs which come from the IR sensor and the potentiometer.
The next step was to test the code by applying the inputs on the circuit before mounting it in the enclosure.
Now, it's time for mounting and integration of the circuit to make a real project. I started with the input and output components then I mounted the others and fortunately none of the components came apart during assembly.
Actually, I spent a long time thinking about the idea of the project So, I asked my classmate Husein El-Khodary and he suggested modifying my last project and I really followed his advice.
I got stuck when I had tried to test the code as the motor was not working when I put my hand near the IR sensor and after I made sure that the connections were correct I started looking for if there was a problem in the code and I started searching on YouTube and actually the problem was that I didn't set an initial value to the analog output responsible for starting the motor
Title of Media
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.
Using the keypad and LCD.
Title of Media