This week's assignment was to build and program a smart circuit using an Arduino UNO which reads a signal from an input component to control an action component using Code Blocks.
Since we were approaching the final project, I decided to do part of my final project to understand how it will work and to lessen the load on myself in the future. I decided to make a circuit with an IR sensor that will rotate a servo motor. I looked at the videos on the portal once again to be able to make my circuit by integrating the IR sensor video with the servo motor video and combing their codes together.
The software used for this assignment is Tinkercad and Arduino.
The materials used for this assignment are:
Breadboard
Arduino UNO
Jumpers
Servo Motor
IR Sensor
Laptop
Tinkercad
Arduino
At first, I watched all the videos and researched each component. I started simulating my circuit on Tinkercad and trying out the code blocks that I found in the videos on the portal.
After simulating the circuit on Tinkercad and making sure that everything is working correctly, I started building the circuit on the breadboard. Since I only needed the positive and negative part of the breadboard, I used an old one and cut the part I needed out of it. I connected all the components together and then I copied the code on the Arduino to download it. However, since the IR sensor always reads true and only reads false when obstructed, I had to change part of the code to make it work like I wanted to (changed = HIGH to == LOW)
I had a problem with understanding how many components work and how to make all of them work correctly simultaneously. Sherif was very helpful and answered all of my questions and gave me tips on how to handle errors or mishaps in different ways.
The biggest challenge in this assignment was that the code that worked in the simulation on Tinkercad did the opposite in real life. It took me some time and research to figure out what went wrong and how to solve it.
Turns out that nothing was wrong only the fact that the IR sensor works differently than the one on Tinkercad.
This assignment was practice for the actual implementation of parts of the final project. Learning how to control a servo motor using and IR sensor helped me figure out how the rotating disk will rotate on its own after sensing the eye presence.
Following the videos on the portal and trying almost every component in real life and seeing them work was so fulfilling!
Monday, 14th of February, 2022
In this week's "Hands-on, Minds-on" activity we were asked to play music by controlling a buzzer with an Arduino board on Tinkercad.
I followed the steps written on the portal and chose to work on the 3rd soundbite provided.
Wednesday, 16th of February, 2022
During Wednesday's mid-week session, we played a game as an ice breaker which was a typing race, Sherif won the first two rounds but then I won the last one. Then, we moved on to the activity which was posted on the portal. I was paired with Amr, we started first by searching about how the RGB LED component works with the Arduino and the code blocks required for it to work as asked. Then, when we finished the first part, we moved onto the next exercise which was to countdown from 9 to 1 using the 7-segment display. Amr was the driver for the first part and we switched for the second part.
Saturday, 19th of February, 2022
In this week's end-of-week session, we spent the first hour discussing with Sherif every issue and question we had regarding the videos on the portal. Then, we were asked to make a smart waving hand using Arduino (once manual (with the potentiometer and another automatic with the ultrasonic sensor). I was paired up with Doaa and we started working. We faced a lot of issues with the code as we did not easily understand the potentiometer and the ultrasonic sensor but Sherif and Esraa were with us with every step and they helped us fix what went wrong.