This week's assignment idea was to build and Program a smart circuit using an Arduino UNO which reads a signal from an input component (Sensor, Switch, or variable resistor) to control an action component (Motor, Buzzer, LED...etc) using Code Blocks.
component :
Arduino UNO
BREADBOARD
JUMPERS
2 RED LEDs
ULTRASONIC DISTANCE SENSOR
2 (220OHM) RESISTORS
buzzer
Ultrasonic Sensor:
Trigger--> on Arduino pin 6
Echo--> on Arduino pin 7
VCC terminal--> +5v
Ground terminal-->GND
led1
cathode terminal --> GND
Anode terminal --> 8
led2
cathode terminal --> GND
Anode terminal --> 9
Buzzer
cathode terminal --> GND
Anode terminal --> 10
Software:
"For Design the circuit "
i used tinkercade to but the circuit and make sure i don't fry more components
I used Arduino IDE to program the Arduino .
Material:
CARDBOARD.
TAPE
GLUE
RULERS
CUTTER
stared to build the code as blocks using tinker cad
i wanted to make 2 conditions with 2 different distances so i used (if condition) from control pin.
the input was 1 different distances so I choose for it the 2 led will be high, and the buzzer is on as u can see.
the input of the 2 pins (6-7) is <25
After downloading the code, I opened the .ino file in Arduino IDE and the clicked on upload after making sure that selected port is Arduino board.
"TINKER CAD" Software:
TINKER CAD Software: (Design the circuit)
I have designed the circuit on tinker cad to see if is going to work or not
I brought my components and start to wire them
laid the breadboard
laid the arduino
powered the breadboard by wiring the (+) to the (5v) pin of the arduino and (-) to the ground of the arduino.
put the red LEDs
added the resistors and wired the first leg at the anode legs of the LEDs
wired the other leg to the pins (8,9) of the arduino.
added an ultrasonic sensor and wire it's
1-(vcc) to the (+) of the breadboard
2-ground to the (-) of the breadboard
3- echo to pin(7) of the arduino
4-tris to pin (6) of the arduino
I used the small breadboard to make my project compact like a save
vcc with ++
gnd witt --
led on pin 8
led on pin 9
buzzer on pin 10
altrasonic echo to pin(7) of the arduino- tris to pin (6) of the arduino
Cardboard
had some troubles with the circuit but finally it worked as it should.
I used the cardboard box to cramp all components and made some cuts and opening for power jack and led
This week I with hussine formed a team in wednesday's lecture he helped me with cooding
On Saturday, Me and salma formed a group and we were required to have several (installation of 2circui with arduino ) to Build a Smart Waving Hand using Arduino. When you wave at the smart hand, it waves back at you! đź‘‹
salma helped me with understanding the compmnant she also helped me access some websites to complete the project.
I've had a lot of problems making the project curcit, and I've changed that over and over again until I get to the final solution,
I got stuck a lot when I was setting the code blocks on TINKERCAD this was first time to coding with blokes and itis not easy
Now I'm able to design a circuit with arduino for the final project.