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)
bootloader/LICENSE
- Committer:
- stkim92
- Date:
- 2019-08-06
- Revision:
- 14:bd420de18a97
- Parent:
- 0:a9d53048f0b6
File content as of revision 14:bd420de18a97:
Permissive Binary License Version 1.0, September 2015 Redistribution. Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met: 1) Redistributions must reproduce the above copyright notice and the following disclaimer in the documentation and/or other materials provided with the distribution. 2) Unless to the extent explicitly permitted by law, no reverse engineering, decompilation, or disassembly of this software is permitted. 3) Redistribution as part of a software development kit must include the accompanying file named "DEPENDENCIES" and any dependencies listed in that file. 4) Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. Limited patent license. The copyright holders (and contributors) grant a worldwide, non-exclusive, no-charge, royalty-free patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims licensable by the copyright holders (and contributors) that are necessarily infringed by this software. This patent license shall not apply to any combinations that include this software. No hardware is licensed hereunder. If you institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the software itself infringes your patent(s), then your rights granted under this license shall terminate as of the date such litigation is filed. DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.