Closed jaka87 closed 5 years ago
Im glad you liked it. It was my first pull request ever :) BTW great job wit the library. I went trough it few times to understand it since the style of coding is a bit different that I'm used to but soon realized that its one of the best libraries written for SIM800 (in my opinion). Obviously I use it in my project as well. I made a weather station with special dedication to measure wind speed and send it to my web page https://github.com/jaka87/vetercek_WS/ We are just a few days before going live.
Looks nice your project! I'm going to close the PR and apply the changes, I'm glad it help you
Hi. With the new commit where GPS location function is in the second file i can't get to call it. Maybe I'm nof familiar with the classes or there is an error in the script.
Trying Geo.readGpsLocation(gps); // GPS location i get
expected unqualified-id before '.' token 41 | Geo.readGpsLocation(gps); // GPS location | ^ exit status 1 expected unqualified-id before '.' token
trying http.readGpsLocation(gps); // GPS location i get
'class HTTP' has no member named 'readGpsLocation' 41 | http.readGpsLocation(gps); // GPS location
Hi Jaka,
I'll document how to use it after having a final version, but meanwhile try this:
unsigned int RX_PIN = 7;
unsigned int TX_PIN = 8;
unsigned int RST_PIN = 12;
Geo geo(9600, RX_PIN, TX_PIN, RST_PIN);
char location[80];
geo.readGpsLocation(location);
I need to refactor the library as Geo extends all the functionality from HTTP where it shouldn't, this is an unstable version as I didn't try it yet in my weather station actively.
Let me know if it works.
Thx for the reply. I have tried your code and I get folowing error.
error: no matching function for call to 'Geo::Geo(int, unsigned int&, unsigned int&, unsigned int&)'
60 | Geo geo(9600, RX_PIN, TX_PIN, RST_PIN);
I assume some changes have to be made in Geo.h
Also at home i get excellent signal and have no problem connecting to network, but on the other location signal is quite poor. Because of that my arduino resets from time to time. I guess its because sim module use more energy (short bursts) when signal is bad. So far i had 1000uF cap instaled to prevent that but will try with 3300 and different antenna. Anyhow to follow signal strength i wrote following function if you might want to include it....
void HTTP::readSignalStrength(char *signalq){
char buffer[32];
cleanBuffer(buffer, sizeof(buffer));
cleanBuffer(signalq, sizeof(signalq));
sendCmd(SIGNAL_QUALITY);
if (readBuffer(buffer, sizeof(buffer)) == TRUE){
parseATResponse(buffer, 2, 2, signalq);
}
}
Jaka please pull the changes of the library and try again, I made some changes here https://github.com/carrascoacd/ArduinoSIM800L/commit/5c08243db57dd463f14660a68f5b981e8dc8e204
Thanks for sharing the function
Seems to be working! I have been testing for few hours... I will let you know in next few days if some trouble occur.
Sleep mode changed to mode 2, which is used more often and I believe simpler to use. Added function to display battery percentage (not just voltage). Added function to detect GPS location - in case device gets stolen.