Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readRTC not finished #111

Open
bt20304 opened this issue Jan 30, 2020 · 2 comments
Open

readRTC not finished #111

bt20304 opened this issue Jan 30, 2020 · 2 comments

Comments

@bt20304
Copy link

bt20304 commented Jan 30, 2020

boolean Adafruit_FONA::readRTC(uint8_t *year, uint8_t *month, uint8_t *date, uint8_t *hr, uint8_t *min, uint8_t *sec) {

The function was made, and an attempt to parse was complete, but never finished. It would be nice if implemented into library.

I used the code below for feather MO as interim

void updateRTC() { //Sets Internal M0 RTC from Structured ASCII msg from GSM Module
char buffer[23];
fona.getTime(buffer, 23);
rtc.setYear( ((buffer[1] - 48) * 10) + (buffer[2] - 48) );
rtc.setMonth( ((buffer[4] - 48) * 10) + (buffer[5] - 48) );
rtc.setDay( ((buffer[7] - 48) * 10) + (buffer[8] - 48) );
rtc.setHours( ((buffer[10] - 48) * 10) + (buffer[11] - 48) );
rtc.setMinutes( ((buffer[13] - 48) * 10) + (buffer[14] - 48) );
rtc.setSeconds( ((buffer[16] - 48) * 10) + (buffer[17] - 48) );
}

@jwallis
Copy link

jwallis commented Feb 4, 2020

Check https://github.com/botletics/SIM7000-LTE-Shield it might have better RTC support.

@OscarVanL
Copy link

OscarVanL commented Apr 4, 2020

#76 from 2016 implements it, and it works perfectly for me on the FONA 3G. All it needs is to be merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants