I got inspiration from my final project idea here and from my talking with Eng. Sherif Rashwan about adding another user interface in minimum user features like pushbutton but in my project I aim to use Steper motor and I don't have one yet so I decided to use a servo motor until I have one and also there is a lot of people make the same project (Automatic dispenser) using servo motor like that
https://create.arduino.cc/projecthub/MissionCritical/diy-hand-sanitizer-dispenser-using-arduino-143de1?ref=similar&ref_id=340554&offset=5
Software:
Tinkercad
Arduino Ide
Bill of Materials :
Arduino Uno
Servo motor
pushbutton
Mini bread board
Jumpers
USB cable
Open (tinkercad.com)
Login by Autodesk account
Select circuits from the left side menu & then select create new circuit.
Select the component that you need from the right menu by searching about them, then drag and drop it one by one in the work/design area.
and the component is:
Arduino Uno.
Servo motor.
pushbutton.
Mini bread board.
connect between them (wiring)like in the picture.
Write code by select the button in the upper right on the page
Select Blocks
Select what we need from the different options(Input-output-control-etc) that we see by select the blocks then drag and drops it in the area below
This is the final code I made it for the project
Now after I finish the wiring and coding I make the simulation from start simulation
I found a problem in the simulation so I open the text to edit it and the problem was fixed by add word PULLUP to the line no.7
I Clicked again in start simulation to check the code is running good and it is.
Downloads the code to but it in Arduino IDE or just I can copy the code text and paste it there
Open Arduino IDE and paste the code text or put the file that we downloaded from the last step
prepare the bill of matrials that I need it to make the project
Arduino Uno
Servo motor
pushbutton
Mini bread board
Jumpers
USB cable
Wire between them as I make in Tinkercad
connect between the Arduino and the laptop by USB cable
burn the code on Arduino after verifying it on the IDE
test the project and check if it work
And Yes it is work perfectly
we just talk in the group about our ideas and how to make it and we help each other by the information and knowledge that we have.
just I have done some research about Ideas to make it but finally I decided to simple it and make it by two component and related to my Final project
As I answered in the first question that component and this project is some kind similar to what I want to do in my final project
I was used idea like code blocks before on Scratch
and I used Arduino before but I didn't know that is there an idea mix between scratch and Arduino and of course this idea is wow It's make using Arduino more easier for children and whatever who need to know and learn Arduino coding