
K6xF board with BG96 of WIZnet for CatM1 board.
Dependencies: FXAS21002 FXOS8700Q
You are viewing an older revision! See the latest version
Homepage
This document is based on https://os.mbed.com/teams/NXP/code/pelion-example-frdm/
This example is known to work great on the following platforms:
FRDM-K64F - onboard Ethernet and onboard SD card holder. FRDM-K66F - onboard Ethernet and onboard SD card holder.
FRDM-K64F FRDM-K66F
Example functionality This example showcases the following device functionality:
Read onboard FXOS8700Q accelerometer and magnetometer, 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 the application into your desktop:
mbed import https://os.mbed.com/users/Daniel_Lee/code/BG96_K6xF_pelion-example-frdm/ cd BG96_K6xF_pelion-example-frdm
2. Install the CLOUD_SDK_API_KEY
mbed config -G CLOUD_SDK_API_KEY <PELION_DM_API_KEY>
For instructions on how to generate your API key, please see the documentation.
3. Initialize firmware credentials (done once per repository). You can use the following command:
mbed dm init -d "<your company name in Pelion DM>" --model-name "<product model identifier>" -q --force
If the above command does not work for your Mbed CLI, please consider upgrading Mbed CLI to version 1.9.x or above.
4. Compile and program:
mbed compile -t <toolchain> -m <TARGET_BOARD>
(supported toolchains : GCC_ARM / ARM / IAR)
5. You can connect on a virtual terminal/COM port to the platform using: << code >> mbed sterm -b 115200 <</code>>