Week 6 - Journal
Ideation
Tell us about your assignment's idea for this week. Why do you care about this idea? What inspired you? (Please include images or links to sources of inspiration)
The Idea for This week's assignment is to build a smart circuit, mine will be the base of a barking sensor for cars. when it senses obstacle or another car approaching it lights the corresponding led as an alert.
I got Inspired when I heard what the sensor can do and the idea just clicked.
Tool Chain
Which software/machines/materials did you use in the assignment? Why?
We Used Tinker CAD to simulate The Circuit and its component.
It is easy to use and safer to test our project without risking the component.
We use Arduino Uno as The Brain
We Use Ultrasonic Sensor as The Distance Input.
We use Arduino IDE as Code software.
Components:
Arduino Uno
Ultrasonic Sensor
Wires
LEDs
Breadboard
Power adapter
Design/Preparation Process
Explain the design and/or preparation process of your assignment. How did you use the tool or software to design and/or prepare your assignment before fabrication/implementation?
The Inputs:
Ultrasonic Sensor.
The Output
The LEDs.
Open Tinker CAD.
Select New and Then Choose Circuit.
Select Breadboard small.
Select 3 LEDs Red, Yellow and Green.
Select 3 Resistance of 220 Ohm
Select Arduino Uno Board.
Select Ultrasonic Distance Sensor.
we used the code blocks with the following in mind:
At 15m to 10 cm turn the green LED on and the rest off.
At 10 to 5cm Turn the yellow LED on and the rest off.
Below 5cm Turn the Red LED on and the rest off.
So, the first "If" Is if anything in a distance more than 15 cm don't turn on any LED.
The rest of the conditions were trickier, we had to add to parameters, so we used the and block to determine a range for the activation of certain LED. so, in the second condition we made the green LED Turn only when the distance was 15cm or less but more than 10 cm and the other LEDs Remain off. the same goes for the third condition, turn on the Yellow LED and the rest off when the distance is 10cm or less but more than 5 cm.
The condition was set to turn the Red LED on and the rest off when the distance was 5cm and less.
Development/Implementation Process
Explain the development/implementation process of your assignment. How did you use the machine/tool to manufacture or implement the design of your assignment?
Connect the (+) of the breadboard with the 5v pin on the Arduino.
Connect the (-) of the breadboard with the ground pin on the Arduino.
Put the 3 LEDs on the breadboard.
Connect the one end of a resistor with the cathode end of the LED and the other with the (-) of the breadboard which is connected to the Arduino.
Connect the anode end of the LED with the digital pins of the Arduino as follows: Red = 2, Yellow = 3, Green = 4.
Connect the Ultrasound distance sensor as follows: Power to the (+) of the breadboard, Ground to the (-) of the breadboard, Trigger to pin 5, Echo to pin 6.
Overcoming Challenges
What kinds of challenges or problems did you face while doing the assignment, tutorials, or exercises? How did you solve them? Did you ask for help from an instructor or peer? Please provide a link to the tutorial or article that you used to solve your problem (if any)
The Challenge was to make the code read value bigger than a number but smaller than another.
I Asked the instructor and gave me a hint. So I used of the "and" function and made it work.
The "and" block is a nesting block works to add 2 conditions together.
Final Project
How can you use the skills and knowledge that you've acquired this week in your final project?
Using Code Blocks is a friendly way to code. It should make it easier and more manageable.