Rapid prototyping with 32-bit MCU-based Curiosity Nano Evaluation Kit using MPLAB Harmony v3 Software Framework: Step 6
This demo application requires adding Click board functionality for the following three Click boards. Click the links below to download the examples for the Click boards.
Add Weather Click Board Routine
Unzip the downloaded ZIP file weather.zip.
From the unzipped folder weather/firmware/src, copy the folder click_routines to the folder firmware/src under your application project.
In the project explorer, right-click on folder Header File and add a subfolder click_routines by selecting Add Existing Items from Folders…

Figure 1
Click on the Add Folder… button.

Figure 2
Select the click_routines folder and select Files of type: as Header Files.

Figure 3
Click on the Add button to add the selected folder.

Figure 4
The Weather Click example header files get added to your project.

Figure 5
In the project explorer, right-click on folder Source Files and add a subfolder click_routines by selecting Add Existing Items from Folders….

Figure 6
Click on the Add Folder button.

Figure 7
Select the click_routines folder and select Files of type: as Source Files.

Figure 8
Click on the Add button to add the selected folder.

Figure 9
The Weather Click example source files get added to your project.

Figure 10
Add Fan Click Board Routine
Unzip the downloaded ZIP file fan.zip.
From the unzipped folder fan/firmware/src/click_routines, copy the folder fan to the folder firmware/src/click_routines under your application project.
In the project explorer, right-click on folder Header Files/click_routines and add a subfolder fan by selecting Add Existing Items from Folders….

Figure 11
Click on the Add Folder… button.

Figure 12
Select the fan folder and select Files of type: as Header Files.

Figure 13
Click on the Add button to add the selected folder.

Figure 14
The Fan Click example header files get added to your project.

Figure 15
In the project explorer, right-click on folder Source Files/click_routines and add a subfolder fan by selecting Add Existing Items from Folders….

Figure 16
Click on the Add Folder… button.

Figure 17
Select the fan folder and select Files of type: as Source Files.

Figure 18
Click on the Add button to add the selected folder.

Figure 19
The Fan Click example source files get added to your project.

Figure 20
Add eINK Bundle Click Board Routine
Unzip the downloaded ZIP file eink_bundle.zip.
From the unzipped folder fan/firmware/src/click_routines, copy the folder eink_bundle to the folder firmware/src/click_routines under your application project.
In the project explorer, right-click on folder Header Files/click_routines and add a subfolder eink_bundle by selecting Add Existing Items from Folders….

Figure 21
Click on the Add Folder… button.

Figure 22
Select the eink_bundle folder and select Files of type: as Header Files.

Figure 23
Click on the Add button to add the selected folder.

Figure 24
The eink_bundle Click example header files get added to your project.

Figure 25
In the project explorer, right-click on folder Source Files/click_routines and add a subfolder eink_bundle by selecting Add Existing Items from Folders….

Figure 26
Click on the Add Folder… button.

Figure 27
Select the eink_bundle folder and select Files of type: as Source Files.

Figure 28
Click on the Add button to add the selected folder.

Figure 29
The eink_bundle Click example source files get added to your project.

Figure 30
Add BLE Source Files
Unzip the downloaded ZIP file pic32cmmc_smart_appliance_control.zip
From the unzipped folder /pic32cmmc_smart_appliance_control/dev_files/pic32cm_mc00_cnano, copy the folder ble to the folder firmware/src/ under your application project
In the project explorer, right-click on folder Header Files and add a subfolder ble by selecting Add Existing Items from Folders….

Figure 31
Click on the Add Folder… button.

Figure 32
Select the ble folder from src/ble and select Files of type: as Header Files.

Figure 33
Click on the Add button to add the selected folder.

Figure 34
The ble example header files get added to your project.

Figure 35
In the project explorer, right-click on folder Source Files and add a subfolder click_routines by selecting Add Existing Items from Folders….

Figure 36
Click on the Add Folder… button.

Figure 37
Select the ble folder and select Files of type: as Source Files.

Figure 38
Click on the Add button to add the selected folder.

Figure 39
The ble example source files get added to your project.

Figure 40
Map Generic Macros of Click Routines
Copy the Generic Macros used in the Fan Click and eINK bundle Click routines
From the unzipped folder fan/firmware/src/click_routines, open the file click_interface.h, and copy the Click routine interfaces/resources Macro Declarations as highlighted in Figure 41

Figure 41
Paste click_interface.h in the folder firmware/src/click_routines under your application project.

Figure 42
From the unzipped folder eink_bundle/firmware/src/click_routines, open the file click_interface.h copy the Click routine interfaces resources Macro Declarations as highlighted in Figure 43

Figure 43
Paste click_interface.h in the folder firmware/src/click_routines under your application project

Figure 44
- Map the generic macros used in the Weather Click, Fan Click, and eINK Click bundle routines to the Harmony PLIB APIs of the PIC32CM MC00 MCU based on where the Click boards are placed on the mikroBUS sockets on the Curiosity Nano Base for Click boards.
Fan Click API Mapping
- In this demo, the Fan Click board is placed on the mikroBUS socket #2, which corresponds to the SERCOM0 I2C peripheral to communicate with the Click board. In the click_interface.h, map the generic Fan Click APIs to SERCOM0 as shown in Figure 45.

Figure 45
Weather Click routine API Mapping.
- In this demo, the Weather Click board is placed on the mikroBUS socket #3, which corresponds to the SERCOM0 I2C peripheral to communicate with the Click board. In the click_interface.h, map the generic Weather APIs to SERCOM0 as shown in Figure 46.
Figure 46
eINK Bundle Click routine API Mapping
- In this demo, the eINK Click board is placed on the mikroBUS socket #1, which corresponds to the SERCOM1 SPI peripheral to communicate with the Click board. In the click_interface.h, map the generic eINK Click APIs to SERCOM1 as shown in Figure 47.

Figure 47