This idea was based on preparatory work for the final project
So I used the LCD monitor and looked it up and found the attached video
Explanation file attached
And I took from them what I needed to prepare the project
Also attached is a picture of the idea code
The idea is:
2 buttons input and 2 output ( Lcd - buzzer )
the first button to play the sound after pressing it by buzzer .
And the second let the screen works And the word diploma appears and my name appears and disappears
I used Arduino IDE Software .
Tinkercad for building the circuit and simulating .
I uesd These materials :
Arduino Uno
Usb cable .
2 push buttons .
Buzzer .
Mini Breadboard .
LCD Liquidcrystal i2c .
Jumpers .
Cardboard .
Adaptor 9 V .
I start software Arduino IDE
First i install A library for Liquidcrystal I2C LCD displays
after i watch videos
then create a wiring diagram by Tinkercad
I used the Arduino UNO board to control the input and output devices
My Idea has two input components with two action
first input : push button make the buzzer working play music
second input : push button : make the LCD show some words (maker diploma 23 - Naeem)
and Output : 1- LCD has a few words and 2- Buzzer making sound
This part of the code demonstrates
Download screen library
and turn on the screen
And the definition of input units - 2 push button as input pullup
at Arduino pins 7 - 8
And also the definition of buzer pins 9 as output
The code is explained here
If the buttons on the Benz 7 were pressed
it plays music by the buzzer
The code is explained here
If the buttons on the Benz 8 were pressed
it make LCD screen show some words
then clear after 2 second
the challenges :
I faced a challenge when uploading the code to the Arduino
Writing does not appear on the screen
I made several attempts and thought there was an error in the code
Until I called a colleague diploma He advised me to:
Behind the screen, there is a lighting control that needs to change direction - until the writing appears
This actually happened and the words appeared
As shown in the attached three photos .
Another challenge:
when writing the code
When adding the screen code inside the pressed button code
I found a delay in executing the command of pressing the button
I found the solution after experimentation
Putting the screen code inside else
That is, when the button is pressed, the buzzer works.
And when you leave the button, the screen works
I will mainly use
screen in the final project
And I have been trained in this duty
to use it
and write its code
and change the words displayed on it
It contains two lines and 16 letters