Lab 4: Add HTTP Web Server to Visualize Data
Objective
In Lab 4, you will enhance the existing application and build a Web Server using Wi-Fi® connectivity to visualize the temperature data.
Overview
The whole application is divided into four tasks.
- Sensor task
- SD Card task
- USB task
- Wi-Fi task
The tasks will run as separate RTOS threads.
The Sensor task will use:
- A button to switch the application on or off
- Timer System Service using Core Timer to periodically sample temperature sensor data
- Asynchronous I2C Driver using I2C1 Peripheral Library to read the temperature sensor
The SD Card task will use:
- Asynchronous SDSPI Driver using SPI2 Peripheral Library to write temperature log onto SD card
- File System Service interfaced with SDSPI Driver to perform operations on the SD card
- RTC Peripheral Library to capture the current log time
The USB task will use:
- Debug System Service and Console System Service using CDC Peripheral Library to print data on a serial port terminal
The Wi-Fi task will use:
- PIC32MZW1 Wi-Fi Driver and WLAN Library
- Wireless System Services components
- Wi-Fi Service to configure the device in SoftAP mode
- Wi-Fi Provisioning Service
- TCP IP Stack
- HTTPNET Server component to enable the Web Server functionality
Procedure
Lab 4 Index
Part 1 - Configure FreeRTOS, I2C Driver, SDSPI Driver, File System, Harmony Core
- Step 1 - Rename Project
- Step 2 - With MHC, Configure TCPIP Stack
- Step 3 - With MHC, Configure HTTPNET Server Component
- Step 4 - With MHC, Modify the Configuration of the File System
- Step 5 - With MHC, Configure Harmony Core
- Step 6 - With MHC, Configure WIFI Service
- Step 7 - With MHC, Generate Code
Part 2 - Add Application Code & Build the Application