I choose to create a part of my final project (set time&alarm) this week.
It is an open-source Arduino Software (IDE), used it to makes it easy to write code and upload it to the board.
to make wiring diagram
I used :
-LCD 1602 letters , number and character
-Keypad 4×3 has 12 buttons in Matrix form to let user enter data.
- piezo
- 4 LEDS
- touch button to stop alarm (Piezo and LEDs)
-male-female wires :to connect lcd and keypad with Arduino.
Summary
home page
HOME PAGE
print Home page on LCD by print room 1 and 2 on first row and room 3 and 4 on the another row.
set page
SET PAGE
when user press 1 on keypad we enter a loop I made with while loop start with set page (which I made by printing 1_set button and *_rst button and room number on the first row then print 2_show button and #_back button on the second row ).
WHILE LOOP
simulate void loop to make it breakable according to my decision which is a back button here pressing #
Validation
"user can add none rational time"
1- Using function called substring which slicing the string into its index and have a start index an d end index . substring (start , end +1);
2- I sliced from 0 to 3 index and save result in variable called hour then sliced from 3to 6 index and save result in variable called minute. After extract time (string) from its variable and slicing it , convert minute and hour to integer using toint function to compare it in if condition.
Alarm
when it set time (from user saved in EEPROM) = real time (from RTC module) Arduino gives signals to LEDs and Piezo
putting the last condition on if condition touch button if its low () there is alarm else stop alarm
In detail
flow charts technique
connect to Arduino
after collect my components , I start to connect components to Arduino
lcd has 7 pins to connect start connect:
-- keypad from 4 black pins (rows)to end to Arduino
-- LCD VCC with 5 v Arduino
GND with ground Arduino
SDA with A4 ARDUINO
SDL with A5 ARDUINO
--Touch button VCC with 5 v Arduino
GND with ground Arduino
in-pin with a digital Arduino pin
--LEDs attached on breadboard with resistors as they are 3v only and Arduino gives 5v(not to damage)
--one leg of lED go with one digital pin and the other with the ground
--Piezo attached one leg with one analog pin and the other with the ground
Simulation
connect Arduino to laptop using USB cable and upload code :
video show set time and alarm case in my final project
i face a problem in offline session this week in how to code a new component Ahmed Adam teach step by step how to do that:
to search (component name Arduino )
choose the first result
in the website will appear how to connect to Arduino
,libraries and how to code according to what you need.
I faced a problem in how to transfer logic in my final project into code so my brother Ahmed help me a lot in understanding .
This week I have a courage to make my final project
this week skill is to contribute all the knowledge i have in the weeks before to make the project.
Title of Media
Title of Media