In this video demonstration, you will use the MPLAB® Harmony TCPIP and USB middleware libraries to create a simple HTTPS client application which communicates with the Yahoo! Weather Service in order to retrieve and display the temperature of a specific location on earth. The retrieved weather data (temperature) is sent to the PC via a USB CDC-class connection (emulating RS-232) and displayed in a terminal emulator such as CoolTerm.
The application is developed from scratch using the MPLAB® Harmony Configurator (MHC) plug-in within MPLAB® X IDE.
The Yahoo! Weather Service API
This service provides an RSS feed containing the current weather conditions for a specific region or city. To use the API, you will need to obtain the WOEID ('where on earth") identifier for the specific region/city of interest. This site provides WOEID codes for all regions.
For more details on how to use the API, please visit the Yahoo! Weather API Documentation page.
The hardware for this project uses the PIC32 Ethernet Starter Kit which contains a PIC32MX795F512L micro controller incorporating USB Host and Device interfaces as well as a 10/100 Ethernet interface. The board features a built-in programmer/debugger, enabling a direct connection to MPLAB® X IDE.
The video below guides you through all the steps required to create and run this demonstration. You will need to download the application files as well as the required software tools and MPLAB® Harmony framework, if you wish to follow along.
- Download the application files (see below). Unzip to your C:\ drive (you should see C:\YAHOO_WEATHER)
- Download MPLAB® X IDE, MPLAB® XC32 and MPLAB® Harmony (see below for links)
- Download CoolTerm terminal emulator software
- Watch the video and copy the application files into the harmony project folder when prompted.
Download Application Files
The .zip file includes the four application files you will need to build the demonstration: app.c, app.h, App_Yahoo.c, certs.h
Download and unzip to your C:\ drive. You should see a new folder C:\YAHOO_WEATHER containing these files.
Download MPLAB® Software
Download CoolTerm Terminal Emulator Software
CoolTerm is a cross platform terminal emulator that runs on Apple OS X, Microsoft Windows, and Linux. It is available for download here.
The video demonstration below is presented by Luc Archambault, Principal Field Applications Engineer, Microchip Technology Inc: