I constantly forget where I parked my car. It sometimes feels like I'm playing Where's Waldo in the parking lot. I know I could open Google Maps and drop a pin where I parked the second I park but that would rely on me to do something consistently (which is my one true enemy!). I wished that there was something that could track where my car was for me without me doing any work and without any continuous costs.
And because I have to make my own wishes come true, this is what led to my idea for using the built in GPS and Bluetooth on the Linkit One to push the GPS coordinates to my phone. When I get out of the a car, the Linkit One will continue to push the coordinates to my phone until I'm out of range. Then when I want to find my car, I just have to look at my phone and it'll have the GPS coordinates readily available.
I'm going to skip the setting up the Linkit One for your computer because there are a lot of tutorials on how to do that (and I've already done that in my other project - Cat Tracker with Linkit One) so if you need to set up your device, there are many on this site to get you there.
I also didn't want to do anything with Android or iOS programming so that anyone could pretty easily do this project without having to create an app as well. For this project, I used the Android app Bluetooth Terminal from the Google Play store but I'm sure almost all Bluetooth terminal apps will do.
https://play.google.com/store/apps/details?id=wingood.bluetooth.btsimpleterminal&hl=en
For hardware I only used the Linkit One and what came with it in the box - a battery, GPS antenna and the Bluetooth antenna. I chose to only use Bluetooth as my mode of communication because: I don't want to pay for a sim card in order to get information and I don't have a wifi connection to get information.
Having a sim card on board is a great advantage but unfortunately, it comes with a continuous cost (the monthly data fee) that I don't want to spend and because of this, having sim cards in ioT devices causes that device to be impractical if the sim card isn't taken advantage of almost constantly. Because I'm leaving my car in parking lots and only using this if I forget where I parked my car, I didn't think it was practical to pay for data to get my location.
Wifi networks are not available everywhere (if only they were...) so I can't rely on using them in order for me to get data. Even if they were, I would have to configure the wifi network wherever I was which would be more work than just dropping a pin in Google Maps.
I started looking for information on how to use the Bluetooth on the Linkit One. On page 51 of the MediaTek Linkit One Developer's Guide, they discuss setting up Bluetooth on the Linkit One (as far as I know there are no examples in the examples in the Linkit One libraries).
http://labs.mediatek.com/fileMedia/download/5fed7907-b2ba-4000-bcb2-016a332a49fd
I have attached the code for the Linkit One and comments that I think you may find helpful.
Sparkfun has an excellent primer on how Bluetooth works and how you can use it:
https://learn.sparkfun.com/tutorials/bluetooth-basics?_ga=1.97219030.85572240.1448894562
To generate the code to send the GPS data, I modified the Bluetooth code found in the Linkit One guide and the GPS example (found in the examples within the Arduino program) so that the GPS data will send whenever a phone is linked via Bluetooth to the Linkit One. I have attached that code with comments as well to help explain it.
As you can see from the video, as soon as I connect to the device I start receiving the GPS information from the Linkit One. I added the portion of code where if I send it the capital letter "S" I receive back the letters "abc". This was a demonstration of how the Linkit One can receive information and based on that information, can send different information. That section of the code could easily be expanded to be how the user requests GPS information but I wanted my system to be as little work as possible so I did not implement that.
How it is currently set up, my phone will automatically connect to the Linkit One when I'm within range of the Linkit One. The Linkit One will then recognize that it is linked and continuously send me the GPS coordinates until I get out of range. When I am trying to find my car, I just copy the latest coordinates sent to my phone into Google Maps and I know where I last left my car.
This system could be placed in someone's car and have the power supply coming from the cigarette lighter port in the person's car. This way whenever the car is on, the Linkit One could transmit the information to the person's phone. After the car is stopped and the person gets out, the Linkit One doesn't need to continue to send information so there's no real reason for it to be on.
Comments