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
- To connect to the internet Access Point using hardcoded credentials
- MAIN_ENABLE_WEB_PROVISIONING macro must be commented in main.h, then
- set the following macro:
- Alternatively keep MAIN_ENABLE_WEB_PROVISIONING macro to enable the
- Wi-Fi web provisioning and follow instruction displayed on UART.
- Build the program and download it into the board.
- 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
*
- Start the application.
- In the terminal window, the following text should appear:
* -- SAMW25 PubNub example --
* -- Compiled: xxx xx xxxx xx:xx:xx --
*
- Once the Wi-Fi is provisioned with internet access connect to PubNub
- website http://www.pubnub.com and login with your account (free).
- Start the application. Go to your Admin Portal and click on Debug Console.
- From here:
- Enter Channel, Publish and Subscribe key as specified on the UART.
- Ensure SSL is enabled.
- Connect to the cloud by pressing the subscribe button.
- After reporting the first data to PubNub server, it is then possible to connect
- 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.