Use rapsberry Pi to drive U-BLOX NEO-6M GPS module

Objective:

In this project, we will use raspberry Pi2  to drive U-BLOX NEO-6M GPS module to get latitude, longitude, altitude,speed etc. U-BLOX NEO-6M GPS module does not support Pi3 , for more info about  U-BLOX NEO-6M , read http://osoyoo.com/2016/10/25/use-mega2560-to-drive-gps/

Connection

Raspberry Pi GPS Module
3.3V VCC
GND GND
GPIO15 (RXD) TXD
GPIO14 (TXD) RXD

raspberry pi GPIOmap

 

Install minicom by running following command in Raspberry Pi terminal:

sudo apt-get -y install minicom

2) block Boot Messages
We need to block raspberry pi sending debug information through serial com ports as those serial ports will be used by GPS module

sudo vim.tiny /boot/cmdline.txt or sudo nano.tiny /boot/cmdline.txt

find" dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait", remove "console=ttyAMA0,115200 kgdboc=ttyAMA0,115200" , leave " dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" , save and exit

 
running following command to edit inittab
sudo vim.tiny /etc/inittab 
find "T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100" ,and # to comments(disable)  this line like this 
"#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100" save and exit

4)restart pi

sudo  reboot

5) run following command

minicom -b 9600 -o -D /dev/ttyAMA0

执行改命令后回到窗口输出了GPS数据

 
Posted in Raspberry Pi Project

Leave a Reply

WordPress spam blocked by CleanTalk.

Meta