erdemarslan / GSMSim

GSM Library for SIMCOM Modules on Arduino.
MIT License
123 stars 55 forks source link

How can i use? at GSMSimTime the get function? #39

Closed rubinlicht closed 3 years ago

rubinlicht commented 3 years ago

I want read out the Time with SIM800L. With the command don't go

get(int day, int month, int year, int hour, int minute, int second)

What make i wrong?

erdemarslan commented 3 years ago

Sometimes module gets time information too late and this function sometimes not work well. Please use getRaw function instead of get function. Then you can split raw value in your code.

H3wastooshort commented 3 years ago

You have to make an existing variable then let the function fill them out:

int day;
int month;
int year;
int hour;
int minute;
int second;
gsmsim.get(day, month, year, hour, minute, second);
Serial.println(day); //a test