Project 2 Keep-Me-Close
Keep-Me-Close makes sure your kid or patient with dementia is around you all the time. It triggers an alarm when your beloved one is out of Bluetooth range and shows the location and direction on your Android smartphone or tablet.
Keep-Me-Close captures GNSS signals and send outs coordinate information via Bluetooth to your smartphone. The APP on your smartphone calculates the direction and distance between your smartphone and Keep-Me-Close. When the Bluetooth link is lost, the APP will trigger an alarm.
What you can learn from this project:
- Using Google Maps Android API
- Reading data from Bluetooth Serial Port Profile (SPP)
- Parsing NMEA GGA sentence
- Calculating the relative direction and distance with two coordinates
- Doing Android UI programming
- Android Studio 1.5.1 or higher for your smartphone
- All the source code of the project can be downloaded here.
Keep-Me-Close project includes the Keep-Me-Close device and mobile client APP. Let's start working on the Keep-Me-Close device.
Assemble the Keep-Me-Close Device:
1. Solder and connect the Adapter Board to the lithium battery.
2. Connect NavSpark with the Adapter Board (No need to insert an SD card).
3. Wire NavSpark and Bluetooth Serial Link together as below.
Upload the Sketch:
1. Open the Arduino, select board (NavSpark, NavSpark-GL or NavSpark-BD) and Leon3 with GNSS library in processor.
2. Build and upload the below sketch onto NavSpark.
Now, let's build the APP.
1. Ensure your smartphone has the right settings enabled to allow installation. You need to go to Menu > Settings > Security and then select Unknown Sources. This allows the APP to be installed from places outside Google Play.
2. Download Keep-Me-Me-Close apk file and open it to install Keep-Me-Close APP on your smartphone.
We are ready to give Keep-Me-Close a try!
1. Open the Settings application on your smartphone and then choose Bluetooth. Perform the Bluetooth pairing to link your Keep-Me-Close device to your smartphone. The Bluetooth device name is the one shown on your Bluetooth Serial Link's label.
2. Tap the Keep-Me-Close icon to launch the APP on your smartphone. The APP will ask you which device to track. Select the Bluetooth device you just paired.
3. Put the Keep-Me-Close device in the pocket of your kid and start tracking. Here are the legends.
Show your phone's location on the map. The latitude and longitude of the location will be displayed, e.g., "My Location 24.784807, 121.008667".
Show the Keep-Me-Close device's location on the map. The latitude and longitude of the location will be displayed, e.g., "Where Are You? 24.784779, 121.008530".
Show the distance between you and the Keep-Me-Close device.
Show the relative orientation between you and the Keep-Me-Close device. In this example, the Keep-Me-Close device is right in front of you.
4. If your smartphone has a position fix but the Keep-Me-Close device doesn't, you will get the following display.
5. If the Keep-Me-Close device has a position fix but your smartphone doesn't. You will get the following display.
6. If your kid is away from you at a distance longer than the Bluetooth signal can reach, you will get the following display and an alarm will be triggered on your smartphone to warn you.