our assignment this week was to design and design a smart circuit using arduino uno
i decided to elaborate on my week 5 assignment (the operation game )
week5 assignment
the game's idea is to remove the ailments (objects inside the holes on the patient ) with out alarming the patient , the game consists of tweezers , led lamp, and small objects in holes foiled with metallic foil.
the contents of the game form an electric circuit, and the tweezers act as a push button , once the tweezers touch the metallic foil it closes the circuit and turns the led lamp on.
the software used to interpret the programing to arduino is arduino ide , and the software used to design the circuit is tinkercad
Arduino ide
tinkercad
the components used in this project are :
1 x buzzer
1 x 220 ampere resistor
1 x red LED lamp
1 x mini breadboard
1 x 5v adapter
1 x metal tweezers
5 x male\male electric wire jumpers
4 x alligator jumpers
double face tape
aluminum foil sheet
cardboard
Arduino Uno
for this assignment i wanted to elaborate on week 5 by by adding a tone to the buzzer sound that imitates pain sounds
first i designed the circuit with the Arduino for programing using tinkercad and assigned:
the buzzer to pin 5
the led to pin 6
the switch (which will be replaced by the tweezers ) to pin 7
then used the code blocks to program the arduino so when the switch gives low signal the arduino sets the led to high and the buzzer to the three different notes
simulating the code in tinkercad
assembled circuit
then copied the code form the text+blocks and added it to arduino ide
before adding the code to arduino, i edited the void setup in pin mode 7 by making it INPUT_PULLUP instead of just INPUT so the arduino can recognize its signal.
Arduino complete code:
week5 assignment
first i added the code to arduino by using arduino ide then tested the circuit before installing in the housing
week5 assignment
i used the same housing of week 5 to but the components inside
final project
sherif helped with writing the code noted on how i need to change the input for the push button to pull up making sure the circuit works properly
i struggled with the circuit as the code kept running without using the push button , then i remembered i needed to adjust the code for the push button to be input_pullup to read the push button signal properly
i could use the skills learnt this week to program the arduino in performing orders from push button input
the coolest thing is i started to code , which is something i don't do usually, though i am having a hard time understanding it , still it's a good start.