Lab 8 - Running the Pre-built MPLAB® Harmony IoT Application From the SD Card
Introduction
This document outlines the procedure to execute a pre-compiled IoT application directly from an SDTM card on the SAM9X75 Curiosity Wireless Kit. The application binary, built on MPLAB® X IDE and configured for file system-based execution, is loaded onto an SD card formatted with a compatible FAT file system. Upon boot, the bootloader or application loader on the target device initializes the file system, mounts the SD card, and executes the binary image. This approach is ideal for rapid validation, demonstration, or deployment of GUI applications without the need for MPLAB X IDE or debugger interfaces.
Running the Pre-Built MPLAB Harmony Graphics Application From the SD Card
The pre-built application BIN file on the SD card can be programmed by following the steps below.
Take an SD card formatted with the FAT32 file system. See the "How to Format and Partition an SD Card Larger Than 32GB Using DiskPart in Windows® for MPU" page.
Program the WIxCS02 M.2 Wi-Fi® module with the correct firmware (WINCS02) image. To do this, follow Step 1 and 2 on the "SAM9X75 Curiosity Wireless Kit - Wi-Fi Quick Start Guide for MPLAB Harmony v3" page.
Wi-Fi is required to run the IoT thermostat application. To connect the thermostat with Wi-Fi, use the Wi-Fi hotspot from mobile with:
- Username: DEMO_AP
- Password: password
Download the Microchip Bluetooth Data (MBD) mobile application from the Google Play™ store to connect to SAM9X75 via Bluetooth®.
On your Apple® device, locate the App Store® icon and download Microchip Bluetooth Data.
Download and install this application in your mobile phone.
The following details are needed when running the application:
Send the message from Bluetooth app:
status ==> You will get status of the Thermostat
Mode OFF ==> Thermostat mode set to OFF
Mode HOT ==> Thermostat mode set to HOT
Mode COOL ==> Thermostat mode set to COOL
To connect to MQTT, download the MyMQTT mobile application.
On your Apple device, locate the App Store icon and download MyMQTT.
Launch the mobile application and set the parameters as follows:
MQTT server: broker.emqx.io
MQTT Port : 1883
MQTT Protocol: MQTT V3
The following details are needed when running the application:
The client ID of the SAM9X75 Curiosity based Thermostat application device is: $MCHP/Wireless/device01, which is subscribed to the topic $MCHP/Wireless/device02.
From the MYMQTT mobile application use the following:
MQTT publish topic: $MCHP/Wireless/device02
MQTT Subscribe topic: $MCHP/Wireless/device01
When publishing messages:
status ==> You will get status of the Thermostat.
Mode OFF ==> Thermostat mode set to OFF
Mode HOT ==> Thermostat mode set to HOT
Mode COOL ==> Thermostat mode set to COOL
Re-use the microSD card used in Step 3 to program the boot.bin and harmony.bin application binaries. Copy and paste boot.bin and harmony.bin to the microSD card.
Insert the microSD card into the SD card J14 slot. Power the board on. Press the rest button (sw3) on the board.
The IoT application will run. Note that the current temperature and humidity value will get updated on the thermostat display every 10 seconds.
Now switch from one screen to another, adjust brightness and set the mode of the display as COOL, HOT or OFF as shown below. Also observe that the indoor temperature measured using the temperature sensor getting displayed on the Thermostat refreshed every 10 seconds.
Establish Wi-Fi and Bluetooth connections on the thermostat as illustrated:
Observe that the GMT will be updated on the thermostat once it is connected via Wi-Fi.
Use Bluetooth to control the thermostat as illustrated.
Refer to Step 5 to install the MBD mobile application. Now launch the MBD mobile application.
The SAM9X75 Curiosity board device name is set to SAM9X75THERMOSTAT. Now scan, connect and establish communication with the SAM9X75THERMOSTAT from the mobile application as shown:
Use MQTT to control the thermostat as demonstrated.
Refer to Step 6 to install the MQTT broker application, then launch the MQTT broker mobile application.
Now subscribe/publish message from the MQTT broker mobile application and control the thermostat:
Debug console output can be obtained as follows:
The thermostat application has now been successfully executed.
The entire application is shown:
Summary
The SAM9X75 Curiosity Wireless Kit-based IoT thermostat application demonstrates the seamless integration of Embedded Wizard GUI, Wi-Fi connectivity, RNBD Bluetooth module, and MQTT protocol for real-time remote monitoring and control. Through this hands-on training, you gained practical experience developing responsive embedded GUIs, configuring wireless communication, and implementing secure MQTT-based IoT messaging. The complete workflow—from GUI design to cloud integration—provides a strong foundation for building scalable, connected embedded applications using the SAM9X75 platform.
Learn More
- SAM9X75 Curiosity Wireless Kit based IoT Thermostat Application
- Lab 1 - How to Create an MPLAB X IDE Project
- Lab 2 - How to Integrate A Temperature Sensor to an MPLAB X IDE Project
- Lab 3 - How to Integrate the RNBD Module to an MPLAB X IDE to Establish Bluetooth Communication
- Lab 4 - How to Integrate the WIxCS02 M.2 Wi-Fi Module Card to an MPLAB X IDE Project to Establish Wi-Fi Communication
- Lab 5 - How to Integrate MQTT to an MPLAB X IDE Project to Publish and Subscribe Data to/from a Cloud Broker
- Lab 6 - How to Integrate an Embedded Wizard GUI Project With an MPLAB X IDE Project
- Lab 7- Debugging and Testing the IoT Harmony Application