Hello everyone,
this is my first post and since I only have very litte knowledge about coding, please don’t judge me to hard I guess there might be a better way to write my program and also format it, so I’m open to get some ideas
Here is a short explanation of my project:
I want to build a GPS car alarm tracker. I know there are many videos and topics and I have read many of them but non of them worked for me or my setup (will explain later). I porbably could buy a commercial one but I like the challange and to learn it for myselfe.
So in principle what the tracker should be able to do in the final version is the following. When somebody enters my car, a PIR sensor detects the motion and sends me an alarm message. Aditionally I want to be able to track my car or maybe set up a geo fence. Everything should be controlled via SMS.
So far I more or less merged the two examples of the Fona Library (GPS and send and receive SMS). At the moment I can send an SMS, switch GPS on/off and get coordinates into the Serial Monitor ;D
Here is my setup:
Arduino UNO (later NANO or PRO MINI), Sim808 EVB 3.2
Problem:
I would be happy to get the SMS with the googlemaps link and have a solid foundation of code to add more SMS commands and functions if I want
But as soon I turn on the SMS code at line 291 in the function getGPS() the arduino restarts once I send the command with SMS.
Similar thing happens if I turn on the SMS command in line 224, which just returns the message I sent previously ONLY that it works for one time, after the second it looks like the arduino restarts.
I’ve read something of memory problems when this happens but I’m not sure if this happens in my case. I also found that it might be caused by the Serial.println(), I will try that later to comment them out.
So far I’m super happy with the code, for my standards and if you have any suggestions or tipps how I can get it running better I would be very thankfull.
You can find the .ino file attached
Cheers,
Kilocheat
KiloTracker_Foru.ino (10.3 KB)