Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Scheduled Alarm in Arduino Mega2560

Status
Not open for further replies.

imranahmed

Advanced Member level 3
Advanced Member level 3
Joined
Dec 4, 2011
Messages
817
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,493
Hi all,

I am writing a program in Arduino Mega2560, the program would look like scheduler alarming system, it has 24 program each program have 50 bells. For example, in a day 24 hours, we want to program 1 for 3 bells (but it has capacity of 50 bells can be scheduled). We go to menu select program 1 then press enter set time for bell1 then bell2 then bell3, then go out main menu. Now we are going to program 4 for 2 bells, set time for bell1 then bell2.

I have no issue for menu programming but I want to know how to store in internal EEPROM or external AT24C1024. When I will go to store P1 for 3 bells, is there any array of 24 programs or array of 50 bells I am confuse here please guide.
 

This should help :




Regards, Dana.
 

    imranahmed

    Points: 2
    Helpful Answer Positive Rating
This should help :




Regards, Dana.
Its help me but I need something different, only assumption, I need 24 EEPROMs and I can store 50 bells in each EEPROM and it should be in a single Arduino Mega2560.
 

What do you need for each bell schedule, how many bytes ?


Regards, Dana.
 

    imranahmed

    Points: 2
    Helpful Answer Positive Rating
What do you need for each bell schedule, how many bytes ?


Regards, Dan
How many actual bytes needed I do not know yet, bell scheduling required because of alarming of sessions in a day. For example, if I want to set three bells will ring in a day so I can set time of each bell and all three bells are stored in my desired block i.e P01. When I select P01 then automatically three bells will be ring on their set time stored in EEPROM. If I want to select five bells in P06 then I select only P06 so all five bells will be ring on their set time stored in EEPROM. Note that there are 24 Blocks P01 to P24. Other things I programmed successfully that are Buttons, Menu, LCD, DS3231 RTC Clock. I can attach external EEPROM AT24C1024.
--- Updated ---

Hi,

why 24 EEPROMs?

Klaus
Hi,

Actually I do not need 24 EEPROMs, it is only for conveyed that my program need 24 blocks each block having capacity of saving/storing 50 bells.
 

I would create a structure holding the variables needed for each bell, and then
write that out to EEPROM.



Regards, Dana.
 

    imranahmed

    Points: 2
    Helpful Answer Positive Rating
I would create a structure holding the variables needed for each bell, and then
write that out to EEPROM.



Regards, Dana.
I am thankful to you for helping. I read your attachment there are structures for EEPROM.
 

Keep in mind structures is a C, C++ language construct, just a way of organizing data
that is correlated by some meaning. Its not a "EEPROM" specific only use, just general
language usage.


Regards, Dana.
 

Keep in mind structures is a C, C++ language construct, just a way of organizing data
that is correlated by some meaning. Its not a "EEPROM" specific only use, just general
language usage.


Regards, Dana.
Ok noted, can I store structure data in EEPROM or it is use only for variables and constants initialization.
 

Yes, it just data that has a unique way of code access.

Maybe this will help :





Regards, Dana.
After learning structures, I think I can make 24 structs of name P01 to P24 and 50 variables or array with 50 elements define in it. Is it right?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top