BG96_K6xF_pelion-example-frdm_Temp

Dependencies:   FXAS21002 FXOS8700Q

Overview

This document is based on https://os.mbed.com/teams/NXP/code/pelion-example-frdm/ and the code forked Daniel_Lee's(https://os.mbed.com/users/Daniel_Lee/code/BG96_K6xF_pelion-example-frdm/)BG96_K6xF_pelion-example-frdm repository and added some features. Need a WIZnet IoT Shield BG96 board and development board.

This example is known to work great on the following platforms:

/media/uploads/stkim92/pel01.png

Requirement

  1. FRDM-K64F or FRDM-K66F
  2. WIZnet IoT Shield BG96 board
  3. USIM card

Example functionality

This example showcases the following device functionality:

Read onboard FXOS8700Q accelerometer, magnetometer and temperature(on shield). And report the values as Pelion LWM2M resources (see image below). (FRDM-K66F only) Read onboard FXAS21002 gyroscope and report the values as Pelion LWM2M resources. On user button click, increment Pelion LWM2M button resource. Allow the user to change the state of the board LED from Pelion LWM2M led_state resource and PUT request.

1. Import into Compiler

/media/uploads/stkim92/pel1.png

2. Apply Update Certificate

/media/uploads/stkim92/pel03.png

3. Compile and Program

/media/uploads/stkim92/pel04.png

4. If successfully connect to cellular networks(SKTelecom) then you can get below message

Device's Result

include the mbed library with this snippet

You can hold the user button during boot to format the storage and change the device identity.

M2Mnet(BG96) Power ON



Sensors configuration:

FXOS8700Q accelerometer = 0xC7

FXOS8700Q magnetometer  = 0xC7



Connecting to the network using the default network interface...

Connected to the network successfully. IP address: 2001:2D8:65

Initializing Pelion Device Management Client...

Initialized Pelion Device Management Client. Registering...

Press the user button to increment the LwM2M resource value...

Celsius temp : 26.10 C                                                             

FXOS8700Q mag:    0.217 x,   0.420 y,   0.288 z [gauss]     

Pelion Cloud Result (1)

/media/uploads/stkim92/pel4.png

Pelion Cloud Result (2)

/media/uploads/stkim92/pel5.png

History

Add MbedCloudClientResource_temperature default tip

2019-08-06, by stkim92 [Tue, 06 Aug 2019 14:38:56 +0000] rev 14

Add MbedCloudClientResource_temperature


Update;

2019-07-24, by Daniel_Lee [Wed, 24 Jul 2019 16:20:11 +0000] rev 13

Update;


Added BG96 power on sequence;

2019-07-24, by Daniel_Lee [Wed, 24 Jul 2019 16:08:43 +0000] rev 12

Added BG96 power on sequence;


Added BG96 power on sequence

2019-07-24, by Daniel_Lee [Wed, 24 Jul 2019 16:03:48 +0000] rev 11

Added BG96 power on sequence


Sync with the latest local branch

2019-06-18, by Daniel_Lee [Tue, 18 Jun 2019 07:07:03 +0000] rev 10

Sync with the latest local branch


Import latest from local branch

2019-05-24, by Daniel_Lee [Fri, 24 May 2019 06:25:48 +0000] rev 9

Import latest from local branch


Update latest

2019-05-07, by Daniel_Lee [Tue, 07 May 2019 06:05:29 +0000] rev 8

Update latest


Modify mbed_app.json configure for BG96 board

2019-04-25, by Daniel_Lee [Thu, 25 Apr 2019 06:45:36 +0000] rev 7

Modify mbed_app.json configure for BG96 board


Initial fork from https://os.mbed.com/teams/NXP/code/pelion-example-frdm/

2019-04-25, by Daniel_Lee [Thu, 25 Apr 2019 05:54:48 +0000] rev 6

Initial fork from https://os.mbed.com/teams/NXP/code/pelion-example-frdm/


Improve inline documentation

2019-03-27, by screamer [Wed, 27 Mar 2019 17:49:40 +0000] rev 5

Improve inline documentation