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 or Knop 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
programming the GUI by processing
Bill of Material :
Arduino Uno
Servo motor
RGB Led
Ultrasonic sensor
Potentiometer
Switch button
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.
RGB Led
3 Resistance 220 ohms
Ultrasonic sensor
Potentiometer
Switch button
bread board.
connect between them (wiring)like in the picture.
Write code by select the button in the upper right on the page
Select text
Write a code
Now after I finish the wiring and coding I make the simulation from start simulation
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
programming the GUI by processing
prepare the bill of matrials that I need it to make the project
Arduino Uno.
Servo motor.
RGB Led
3 Resistance 220 ohms
Ultrasonic sensor
Potentiometer
Switch button
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
After finishing the programming in processing it sent to me error and i couldn't know it 's meaning because it was never been sent it to me
when I search I found that mean the port is not used
I have done a lot of research about this program and how to connect between it and Arduino .
And I faced a problem with my serial read only when I send letter 'a' to the Arduino port and my friend suggest it was in the code to change the location of the (print.Serial())
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 And also how to create graphical input by using processing
how to communicate with Arduino wireless by using Bluetooth or Wi-Fi Modules
How to mix and link between two inputs and two outputs with Arduino and make the code for all of them to work together and depended for each other and how to use Bluetooth module to play with RGB and servo