Installation

Since the RFzero is compatible with the world of Arduino you can make a smooth integration of the RFzero library and example programs into the Arduino Integrated Development Environment (IDE). If you haven’t installed the Arduino IDE already please do so first. Once the Arduino IDE has been installed please perform the below steps 1) to 3).

1) Add the RFzero library path

From the Arduino IDE select Menu | File | Preferences. To the Additional Boards Manager URLs input field please add:

Please make sure you remember the http:// part!

Windows path

The RFzero package is automatically installed in: C:\Users\<User>\appdata\Local\Arduino15\packages\RFzero

Linux path

The RFzero package is automatically installed in: $HOME/.arduino15/packages/RFzero

Mac OS path

The RFzero package is automatically installed in: /Users/<User>/Library/Arduino15/packages/RFzero

2) Add the Arduino SAMD boards and the RFzero SAMD boards

From the Arduino IDE select Menu | Tools | Board: “…“ | Board Manager … Type “samd” next to the Type ALL to narrow the search result.

Then click on “Arduino SAMD Boards (32-bits ARM Cortex-M0+) …” and install/update to version 1.6.20.

If the installation process asks if you want to install additional Arduino relevant programs please do so.

Then click on “RFzero SAMD Boards (GPS based RF Clock Generator) …” and install/update to the latest version.

For using the RFzero the other SAMD Boards options are not necessary.

You have now integrated the RFzero into the Arduino IDE like any other native Arduino board.

3) Select RFzero as board

To set the target board to RFzero please go to Menu | Tools | Board “…” and scroll down the list until you see the RFzero board and select it.

Then select the right COM port from the Menu | Tools | Port … The RFzero identify itself as an “Arduino/Genuino Zero (Native USB Port)”.

You are now ready to go. However, if you want you can check that the Arduino IDE actually can see the RFzero from the Arduino IDE select Menu | Tools | Get Board Info.

You may even use the RFzero example programs that has also been installed automatically and are available from the Arduino IDE select Menu | File | Examples | Examples for RFzero.

Updating the library

When you want to update to a new version, or go back to a previous version, you can do this from the Board Manager found in the Arduino IDE select Menu | Tools | Board: “…“ | Board Manager … Then type “rfz” next to the Type ALL to narrow the search result and click on “RFzero SAMD Boards (GPS based RF Clock Generator) …” and select the version you want to use.

If you want you can also let the Arduino IDE automatically notify you when there are new versions, of any library, available. You do this in the Preferences from the Arduino IDE select Menu | File | Preferences | Check for updates on startup.

Troubleshooting installation/updating

RFzero.h no such file or directory

If you experience that the Arduino IDE says: “RFzero.h no such file or directory” you have most likely not selected the RFzero as the board.

To set the target board to RFzero go to Menu | Tools | Board “…” and scroll down the list until you see the RFzero board and select it.

An error occurred while uploading the sketch

The most likely reason when you see the error message “An error occurred while uploading the sketch” is that you have not selected the right COM port for the RFzero.

You select the right COM port from the Menu | Tools | Port … The RFzero identify itself as an “Arduino/Genuino Zero (Native USB Port)”.

Couldn’t find a Board on the selected port

You have probably selected the wrong COM port for your RFzero board.

Please verify that have selected the right COM port from the Menu | Tools | Port … The RFzero identify itself as an “Arduino/Genuino Zero (Native USB Port)”.

Error compiling for board RFzero

Sometimes the Arduino installation/updating process goes wrong leading to a situation where more than one version of a software library, e.g. the RFzero library, is installed. When this happens the Arduino IDE cannot compile programs using the specific library. Unfortunately the Arduino IDE is not able to rectify this situation itself but needs your manual intervention.

If this happens please go to the directory where Arduino installed the RFzero libraries and delete the irrelevant RFzero directory:

Windows path: C:\Users\<User>\appdata\Local\Arduino15\packages\RFzero

Linux path: $HOME/.arduino15/packages/RFzero

Mac OS path: /Users/<User>/Library/Arduino15/packages/RFzero

If you deleted everything then reinstall the latest library. Afterwards please remember to select the RFzero board from the Arduino IDE select Menu | Tools | Board.

If the installation/updating went wrong with another library then you should of cause delete this library from the packages directory.

In extreme cases you will have have to uninstall the Arduino IDE completely. Then check that the package path as shown above has been deleted too. If not delete it manually. Then reinstall everything again using the above steps 1) to 3).

Arduino IDE check

If you want to check if you performed the installation steps correctly you can try to compile this ultra small program from within the Arduino IDE:

Uploading the program to your RFzero is not necessary because it has no real functionality.

Writing programs for the RFzero

The RFzero has an onboard EEPROM which can be used to store and retrieve the program settings if any. The following structure is recommended to get everything in place and in the right order.

A simple frequency generating program

The below program generates a steady carrier on 10 MHz, however, it is not GPS locked.