This project shows how to use Mbed CE's U-Blox GNSS driver to connect to, configure, and get data from a U-Blox GNSS.
- U-Blox GNSS. Currently the MAX-8 and ZED-F9P are supported, but other Gen8 and Gen9 devices should be able to be added easily (they might work out of the box).
- For example, this breakout should work for the MAX-M8.
- GNSS/GPS antenna.
- If your antenna has an integrated amplifier, ensure that the amplifier is getting power, or your performance will be garbage. For Gen9 modules that provide internal antenna power, the driver knows to turn this on automatically (not implemented in Gen8 yet!).
- Any Mbed board with SPI or I2C support
- Clone it to your machine. Don't forget to use
--recursive
to clone the submodules:git clone --recursive https://github.com/mbed-ce/ublox-gnss-demo.git
- Set up the GNU ARM toolchain (and other programs) on your machine using the toolchain setup guide.
- Set up the CMake project for editing. We have three ways to do this:
- On the command line
- Using the CLion IDE
- Using the VS Code IDE
- Connect the GNSS to the Mbed board via I2C or (if supported by the GNSS) SPI. Also connect the antenna to the GNSS.
- Update GNSSConstructor.h to fill in the GNSS module and pins you are using in your setup. Then, comment the warning at the top.
- Build the
flash-GNSSDemo
targets to upload the code to a connected device. - Open a serial monitor and access the console.
- Use the "Reconfigure GNSS settings" menu option to flash the correct configuration onto the GNSS so that it works with this driver.
- Use the "View data in GNSS HUD" menu option to open a live view of the GNSS data!