Simple Mbed Cloud Client application using features of K64 & K66
Connect to Mbed Cloud!
This example was customized a bit for FRDM-K66 and FRDM-K64F.
It depends on having an SD Card plugged in for storage of credentials. It could be changed later to use a SPI flash or other storage on a shield or wired in.
The app keeps track of how many times switch 2 (SW2) is pressed. The value can be retrieved via a GET request to Mbed Cloud.
Also, it will blink a pattern based on milisecond (ms) timing values that can be sent from Mbed Cloud. The pattern can be sent with a PUT request and the blinking sequence can be triggered by a POST request.
update_default_resources.c@15:df35a45db1cc, 2018-10-09 (annotated)
- Committer:
- maclobdell
- Date:
- Tue Oct 09 22:08:16 2018 -0500
- Revision:
- 15:df35a45db1cc
- Parent:
- 10:3f30c0e55a8e
remove sd driver. its in mbed-os now.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maclobdell | 10:3f30c0e55a8e | 1 | // ---------------------------------------------------------------------------- |
maclobdell | 10:3f30c0e55a8e | 2 | // Copyright 2016-2018 ARM Ltd. |
maclobdell | 10:3f30c0e55a8e | 3 | // |
maclobdell | 10:3f30c0e55a8e | 4 | // SPDX-License-Identifier: Apache-2.0 |
maclobdell | 10:3f30c0e55a8e | 5 | // |
maclobdell | 10:3f30c0e55a8e | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); |
maclobdell | 10:3f30c0e55a8e | 7 | // you may not use this file except in compliance with the License. |
maclobdell | 10:3f30c0e55a8e | 8 | // You may obtain a copy of the License at |
maclobdell | 10:3f30c0e55a8e | 9 | // |
maclobdell | 10:3f30c0e55a8e | 10 | // http://www.apache.org/licenses/LICENSE-2.0 |
maclobdell | 10:3f30c0e55a8e | 11 | // |
maclobdell | 10:3f30c0e55a8e | 12 | // Unless required by applicable law or agreed to in writing, software |
maclobdell | 10:3f30c0e55a8e | 13 | // distributed under the License is distributed on an "AS IS" BASIS, |
maclobdell | 10:3f30c0e55a8e | 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
maclobdell | 10:3f30c0e55a8e | 15 | // See the License for the specific language governing permissions and |
maclobdell | 10:3f30c0e55a8e | 16 | // limitations under the License. |
maclobdell | 10:3f30c0e55a8e | 17 | // ---------------------------------------------------------------------------- |
maclobdell | 10:3f30c0e55a8e | 18 | |
maclobdell | 10:3f30c0e55a8e | 19 | #ifdef MBED_CLOUD_CLIENT_USER_CONFIG_FILE |
maclobdell | 10:3f30c0e55a8e | 20 | #include MBED_CLOUD_CLIENT_USER_CONFIG_FILE |
maclobdell | 10:3f30c0e55a8e | 21 | #endif |
maclobdell | 10:3f30c0e55a8e | 22 | |
maclobdell | 10:3f30c0e55a8e | 23 | #include <stdint.h> |
maclobdell | 10:3f30c0e55a8e | 24 | |
maclobdell | 10:3f30c0e55a8e | 25 | #ifdef MBED_CLOUD_DEV_UPDATE_ID |
maclobdell | 10:3f30c0e55a8e | 26 | const uint8_t arm_uc_vendor_id[16] = { "dev_manufacturer" }; |
maclobdell | 10:3f30c0e55a8e | 27 | const uint16_t arm_uc_vendor_id_size = sizeof(arm_uc_vendor_id); |
maclobdell | 10:3f30c0e55a8e | 28 | |
maclobdell | 10:3f30c0e55a8e | 29 | const uint8_t arm_uc_class_id[16] = { "dev_model_number" }; |
maclobdell | 10:3f30c0e55a8e | 30 | const uint16_t arm_uc_class_id_size = sizeof(arm_uc_class_id); |
maclobdell | 10:3f30c0e55a8e | 31 | #endif |
maclobdell | 10:3f30c0e55a8e | 32 | |
maclobdell | 10:3f30c0e55a8e | 33 | #ifdef MBED_CLOUD_DEV_UPDATE_CERT |
maclobdell | 10:3f30c0e55a8e | 34 | const uint8_t arm_uc_default_fingerprint[32] = { 0 }; |
maclobdell | 10:3f30c0e55a8e | 35 | const uint16_t arm_uc_default_fingerprint_size = |
maclobdell | 10:3f30c0e55a8e | 36 | sizeof(arm_uc_default_fingerprint); |
maclobdell | 10:3f30c0e55a8e | 37 | |
maclobdell | 10:3f30c0e55a8e | 38 | const uint8_t arm_uc_default_certificate[1] = { 0 }; |
maclobdell | 10:3f30c0e55a8e | 39 | const uint16_t arm_uc_default_certificate_size = |
maclobdell | 10:3f30c0e55a8e | 40 | sizeof(arm_uc_default_certificate); |
maclobdell | 10:3f30c0e55a8e | 41 | #endif |