Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of merged_code2_3rd_nov_2017_15th_dec_2017_magicno_removal by
rtc.cpp
- Committer:
- nikitateggi
- Date:
- 2017-12-19
- Revision:
- 61:2143f39103f7
- Parent:
- 60:945c4a1e9a13
File content as of revision 61:2143f39103f7:
#include "mbed.h"
#include <stdio.h>
#include "ds3231.h"
#include "rtc.h"
#include "main.h"
time_t rtc_read()
{
Ds3231 rtc(I2C_SDA_PIN, I2C_SCL_PIN);
time_t epoch_time1;
epoch_time1 = rtc.get_epoch();
return epoch_time1; // return the time
}
