This project was simply about creating at GPS tracking system that gave real time updates on the location of a vehicle from anywhere in the world. In essence, we wanted to create a device that would run off of 3G cellular signal and Wifi in order to give updated GPS coordinates directly to the user.
This project was sparked by us wanting to create some measure of security for our vehicles using multiple particles. We decided on a GPS tracking system. The idea is simple; one particle would be connected to an OLED screen that receives the GPS and battery information, and the other particle would constantly feed GPS data to the cloud.
The first part of the project was applying the GPS code (shown below) to our Electron with 3G capability. There was no wiring required to operate the Electron, just simply connect the rechargeable battery to the Electron and flash the code.
Next, we had to wire the Micro OLED screen from the Photon Makers Kit to the Photon Particle. The wiring diagram for this part is shown below. However, Fritzing, the schematic program we used, did not have the correct OLED screen in its part inventory. They had a similar screen, but for reference, I have included the correct pin layout for wiring the screen to the Photon.
Once the screen is connected, we flashed the code shown below. Do not be alarmed if the screen does not print the data from the cloud automatically. Allow the data to refresh and print new data to the cloud. Once this happens, the screen will begin printing all necessary data.
The real trick to the project was finding a way to pull the data from the cloud and print it to the screen. This was the most difficult part of the project. Below is the code used for the project. It is a great example of how to pull the strings directly from the cloud and allocate them to a variable (which was the hardest part to solve).
Side Note: We got an actual test of how well the system works. While working on the project, we had to keep the Electron in an outdoors area so it could transmit GPS via 3G. The second we got the project completely working, I looked up an noticed that our Electron had been taken. It was still transmitting GPS to the OLED screen, so we tracked the GPS coordinates until we found the Electron. The GPS reading is good to within a 50 to 100 foot radius, which we found from our unusual test.
Comments