johnny78
Full Member level 5
- Joined
- Jun 28, 2017
- Messages
- 270
- Helped
- 1
- Reputation
- 2
- Reaction score
- 5
- Trophy points
- 1,298
- Activity points
- 3,464
hi Guys
im trying to set time manualy using Ds1307 Module & Atmega328P working on Arduino IDE
the set time example is too easy it gets the time from the pc & updates the rtc time
i want to set the time manually But i couldnt find how to do that
im using the original ds1307 library which i couldnt fine a way to set time manually
here is the section of code set the time:
would you please help with this ?
thanks in advance
im trying to set time manualy using Ds1307 Module & Atmega328P working on Arduino IDE
the set time example is too easy it gets the time from the pc & updates the rtc time
i want to set the time manually But i couldnt find how to do that
im using the original ds1307 library which i couldnt fine a way to set time manually
here is the section of code set the time:
Code:
void setup() {
bool parse=false;
bool config=false;
// get the date and time the compiler was run
if (getDate(__DATE__) && getTime(__TIME__)) {
parse = true;
// and configure the RTC with this info
if (RTC.write(tm)) {
config = true;
}
}
thanks in advance