Qwiic GPS Clock
The following code used in this tutorial has been written and tested on Arduino IDE version 1.8.12. Otherwise, make sure you are using the latest stable version of the Arduino IDE on your desktop. You can find a list of stable versions on Arduino's site. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE.
If you have not previously installed an Arduino library, please check out our installation guide to automatically install.
Installing an Arduino Library
January 11, 2013
At a minimum, you will need the u-blox Arduino library. The following code is based on example 15. Additional code was added to adjust the date and time based on:
- time zone
- daylight savings time (if applicable in your region)
- 12-hour (AM/PM) or 24-hour (military) format
- digital or analog (if you are using a graphic display)
The SparkFun U-blox Arduino library can be downloaded with the Arduino library manager by searching 'SparkFun Ublox' or you can grab the zip here from the GitHub repository. At the time of writing this tutorial, we were using version 1.8.5.
Depending on the display that you use, you may need additional library installed. You will need to check out the hookup guide for the display for more information.
Depending on your board, you may need to install drivers to upload code to the Arduino. In this case, we'll be using the RedBoard Qwiic with the CH340 populated on the board. They should automatically be installed on your computer. However, if you need to manually install the drivers, check out the following tutorial.
If you are using a different development board, you may need to install a different driver. Some have dedicated ICs like the FTDI but others may have a built-in CDC for the COM port (i.e. ATmega32U4, SAMD21, SAMD51, etc.). You will need to check out the hookup guide for that board for more information.
Since we are using the RedBoard Qwiic, we do not need to install a board in the Arduino IDE as it is using the Arduino Uno for the board selection. If you decide to use a different board, you may need to install additional dependencies for that processor. You will need to check out the board's hookup guide for more information as well.