Do you want to make your own Car tracker ? If you say yes, This tutorial is for you.
- Firstly, Connect your Raspberry Pi to internet and run
sudo apt-get updateto update your Raspberry Pi
- We should stop getty service on Raspbian.
- For non Raspberry Pi 3 machines, remember it’s /dev/ttyAMA0 that is linked to the getty (console) service. So you need to perform this command from a terminal window:
- For Raspberry Pi 3’s the command is similar but referencing /dev/ttyS0:
- You also need to remove the console from the cmdline.txt. If you edit this with:
sudo nano /boot/cmdline.txt
123dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splashplymouth.ignore-serial-consoles
remove the line: console=serial0,115200 and save and reboot for changes to take effect.
- You also need to enable uart with edit /boot/config.txt file
sudo nano /boot/config.txtand add
enable_uart=1to bottom of file then save and reboot for changes to take effect.
- Download source code
- Make it executable
sudo chmod +x GpsTracker.py
- Run it
sudo python GpsTracker.py