WICED SDK comes with multiple sample/demo applications. One of them is temp_control (...//apps/demo/temp_control).
The temp_control demo application demonstrates the temperature read from the thermistor on the evaluation board sends the result to cloud server (https://xively.com) and also displays it on local webpage. Also demonstrates the temperature control with onboard push button switches and via local webpage.
The https server could be started on the WICED, for calls to start the https server please take a look at
Below is the copy from the demo application source file (.../apps/demo/temp_control/temp_control.c):
/** @file * * Temperature Control & Report Application * * This application measures the temperature of the WICED evaluation * board and sends temperature measurements to the 'Internet of Things' data * warehouse http://xively.com/. The app also displays temperature & setpoint * status on a local webpage. * * The application demonstrates the following features ... * - Wi-Fi client mode to send temperature measurements to the Internet * - DNS redirect * - Webserver * - Gedday mDNS / DNS-SD Network Discovery * - GPIO interface to capture button inputs * - Timer peripheral interface to control LED brightness (via PWM) * - Factory Programming - please read WICED-AN8xx-R Factory Programming Application Note * * [TBD : The application will eventually be configured to control the temperature of * a thermistor on a personality board plugged into the WICED evaluation board. * At present, the temperature and setpoint are independent. There is no feedback * mechanism in place to heat or cool the thermistor (to make the board temperature * equal to the setpoint).] * * Device Configuration * The application is configured to use the Wi-Fi configuration * from the local wifi_config_dct.h file. Application configuration is taken * from the temp_control_dct.c file and stored in the Device Configuration table (DCT). * * Xively Setup (must be completed before temperature reporting to Xively will work) * 1. Go to http://xively.com and create an account * * 2. After logging in, various views are available by clicking * your username in the top right corner of the window * * 3. Select the 'Develop' tab * a. Click 'Add Device' to add a new feed * b. Enter device information as desired and click 'Add Device' * c. Note down the Feed ID and auto-generated API key that were created * * 4. Click the 'Add Channel' button * a. Enter the desired channel ID * b. Complete other fields as desired and click 'Save Channel' * * 5. In the <WICED-SDK>/apps/demo/temp_control directory, add the * feed ID, API key, and channel ID into the temp control DCT config file : temp_control_dct.c * * 6. Compile and run the temp_control application * * 7. View the temperature log at https://xively.com/feeds/<YOUR_FEED_ID> * * Application Operation * This section provides a description of the application flow and usage. * The app runs in a thread, the entry point is application_start() * * Startup * - Initialise the device * - Check the device has a valid configuration in the DCT * - Setup peripherals including buttons, LEDs, ADC and timers * - Start the network interface to connect the device to the network * - Set the local time from a time server on the internet * - Setup a timer to take temperature measurements & send data to Xively * - Start a webserver to display temperature & setpoint values * - Start Gedday to advertise the webserver on the network * * Usage * Two buttons on the eval board are used to increase or decrease * the temperature setpoint. The D1 & D2 LEDs on the eval board change * in brightness according to the temperature setpoint. * * The current time, date, board temperature and setpoint are published to * a webpage by a local webserver. The setpoint can also be changed using * buttons on the webpage. * * A mDNS (or Bonjour) browser may be used to find the webpage, or alternately, the * IP address of the device (which is printed to the UART) may be entered * into a web browser. * * As described above, the temperature of the eval board can be viewed * online at https://xively.com/feeds/<YOUR_FEED_ID> * */
Hope it helps.