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:
Requirement
- FRDM-K64F or FRDM-K66F
- WIZnet IoT Shield BG96 board
- 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
2. Apply Update Certificate
3. Compile and Program
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)
Pelion Cloud Result (2)