Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
WINC1500 PubNub Cloud Demo for SAMW25 XPlained Pro Documentation

Introduction

This example demonstrates the use of the SAMW25 Xplained Pro with I/O1 Xplained Pro board to communicate with pubnub.
It uses the following hardware:

  • SAMW25 Xplained Pro.
  • I/O1 Xplained Pro on EXT1.

Main Files

  • main.c : Initialize the SAMW25 and communicate with PubNub cloud.

Usage

  1. To connect to the internet Access Point using hardcoded credentials
  2. MAIN_ENABLE_WEB_PROVISIONING macro must be commented in main.h, then
  3. set the following macro:
    * #define MAIN_WLAN_SSID "SSID"
    * #define MAIN_WLAN_PSK "PASSWORD"
    *
  4. Alternatively keep MAIN_ENABLE_WEB_PROVISIONING macro to enable the
  5. Wi-Fi web provisioning and follow instruction displayed on UART.
  6. Build the program and download it into the board.
  7. On the computer, open and configure a terminal application as the follows.
    * Baud Rate : 115200
    * Data : 8bit
    * Parity bit : none
    * Stop bit : 1bit
    * Flow control : none
    *
  8. Start the application.
  9. In the terminal window, the following text should appear:
    * -- SAMW25 PubNub example --
    * -- Compiled: xxx xx xxxx xx:xx:xx --
    *
  10. Once the Wi-Fi is provisioned with internet access connect to PubNub
  11. website http://www.pubnub.com and login with your account (free).
  12. Start the application. Go to your Admin Portal and click on Debug Console.
  13. From here:
  14. Enter Channel, Publish and Subscribe key as specified on the UART.
  15. Ensure SSL is enabled.
  16. Connect to the cloud by pressing the subscribe button.
  17. After reporting the first data to PubNub server, it is then possible to connect
  18. to https://freeboard.io to configure a dashboard and to show reported data.

Compilation Information

This software was written for the GNU GCC compiler using Atmel Studio 6.2 Other compilers may or may not work.

Contact Information

For further information, visit Microchip.