Arduino IDE Download and Installation
For WisBlock coding and programming, use Arduino IDE. If you don't have an Arduino IDE yet, you can download it in the Arduino official website.
⚠️ WARNING: If you are using Windows 10. Do NOT install the Arduino IDE from the Microsoft App Store. Please install the original Arduino IDE from the Arduino official website! The Arduino app from the Microsoft App Store has problems to use third party Board Support Packages. |
You can see the current version of Arduino IDE is V1.8.13, and there are several versions available for Windows, Linux, and Mac OS X. Choose the correct version of Arduino IDE and download it.
Install in Windows
Now let's install the Arduino IDE, which you just downloaded, on your Windows PC.
Click I Agree to proceed.
Click Next.
Click Install.
After 100% progress, the Arduino IDE has been installed successfully.
Install in Linux
In Linux, there is no install process. It is just a process of uncompression, then you can open Arduino IDE successfully.
📝 NOTE: There are some Linux distributions where Pyserial must be installed first. This can be done by installing Pyserial using pip. |
Execute the following in terminal:
-
sudo apt-get install python3-pip python-dev
(needed if pip is not installed yet) pip3 install pyserial
Install in Mac OS X
In Mac OS X, the same with Linux, there is no install process. It is just a process of uncompression, then you can open Arduino IDE successfully.
Open Arduino IDE
As shown in Figure 7 above, the Arduino IDE has mainly 5 parts:
IDE Option Menu
You can configure some general parameters such as the serial port, the board information, the libraries, the edit parameters, and so on.
Operating Buttons
The operating buttons has five operations.
- Verify/Compile the source code.
- Upload the compiled code into WisBlock.
- Open a New Arduino IDE window or existing application.
- Save the current application.
Code Area
You can edit the source code which will be compiled and uploaded into WisBlock later in this area.
State Area
Output Message Area
You can see the output message in this area, whether it's a failed or a success information.
Configuration On Arduino IDE
Once Arduino IDE has been installed successfully, and you've understood the mainly parts of Arduino IDE, you can do some configuration changes on Arduino IDE so that it can be adapted to WisBlock.
Open Arduino IDE.
Go into Preferences.
To add the WisBlock Core on your Arduino Boards list, you need to edit the Additional Board Manager URLs. Click the icon as shown in Figure 10.
📝 NOTE: You need to enable verbose output, as well, by clicking the checkboxes compilation and upload . This will ensure that you will see the important details like warnings and errors during compilation and uploading. |
Copy this URL https://raw.githubusercontent.com/RAKwireless/RAKwireless-Arduino-BSP-Index/main/package_rakwireless_index.json
and paste it on the field as shown in Figure 11. If there are other URLs already there, just add it on the next line. After adding the URL, click OK.
📝 NOTE: If you are using Linux, you need to install adafruit-nrfutil via pip.
|
Restart the Arduino IDE.
Open the Boards Manager from Tools Menu.
Write RAK in the search bar, as shown in Figure 13. This will show the available RAKwireless WisBlock Core boards that you can add in your Arduino Board list. Choose the WisBlock Core that you have, select the updated version from the dropdown list, and click Install.
Once the BSP is installed, select any RAK WisBlock modules which will update your system configuration to use the right compiler and settings for the module.
Examples and Tutorials
After selecting a RAK board, you can see the examples for all WisBlock modules.
📝 NOTE: Updated and complete WisBlock examples can be found in the WisBlock Examples repository, which contains source codes that you can copy-paste and upload. Aside from that, each WisBlock Modules has its own quick start guide to help you in your WisBlock journey. |
Compile an example
Let's take one of the examples and compile it. Open the LoRaWAN-OTAA example from the File -> Example menu.
The example will open in a new window. You can close the old window.
Next we need to install the LPWAN library. In the code in line 20 you can see the link for the required library.
Double click on the link to open the library manager. It will show you the required library.
Click on Install to install the library. After installation you can close the library manager window.
Now we are ready to compile the example code.
Click on the Verify/Compile icon in the menu.
Now, you have successfully installed the LPWAN library and compiled your first WisBlock solution. However, to be able to connect to the LPWAN gateway and the LPWAN server, a few more steps are required. Head on to the full tutorial in the RAK Github WisBlock repository to see how to setup the node's EUI's and keys and how to register the node on the gateway and in the LPWAN server.
For more information about the examples and tutorials, visit RAK Github WisBlock repository.
Credits
This BSP is based on Adafruits nRF52 BSP. It is based on Arduino-nRF5 by Sandeep Mistry which is also based on the Arduino SAMD Core.
The following libraries are used:
- adafruit-nrfutil is based on Nordic Semiconductor ASA's pc-nrfutil
- freeRTOS as operating system
- tinyusb as USB stack
- nrfx for peripherals driver
- littlefs for internal file system
Bernd Giesecke Electronics Engineer, 23 years of experience in industrial and automotive HW and SW R&D. Supporting Arduino open-source community since 2014. |
Updated