![](/media/cache/profiles/d68e30601ca27cf28d9e143af9fdc7e2.jpg.50x50_q85.jpg)
The project is about embedding temperature sensor, a PIR sensor and a thermocouple with RFID as a security measure and sending the data to ThingSpeak Cloud with a WiFi module ESP8266
Dependencies: DHT ESP8266 MFRC522
README.md@0:94f21066fc43, 2017-03-28 (annotated)
- Committer:
- architmuchhal
- Date:
- Tue Mar 28 17:19:25 2017 +0000
- Revision:
- 0:94f21066fc43
Internet I/O Bus powered by Hexiwear Brain using FRDM - K64F
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
architmuchhal | 0:94f21066fc43 | 1 | # Getting started with Blinky on mbed OS |
architmuchhal | 0:94f21066fc43 | 2 | |
architmuchhal | 0:94f21066fc43 | 3 | This guide reviews the steps required to get Blinky working on an mbed OS platform. |
architmuchhal | 0:94f21066fc43 | 4 | |
architmuchhal | 0:94f21066fc43 | 5 | Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli). |
architmuchhal | 0:94f21066fc43 | 6 | |
architmuchhal | 0:94f21066fc43 | 7 | ## Import the example application |
architmuchhal | 0:94f21066fc43 | 8 | |
architmuchhal | 0:94f21066fc43 | 9 | From the command-line, import the example: |
architmuchhal | 0:94f21066fc43 | 10 | |
architmuchhal | 0:94f21066fc43 | 11 | ``` |
architmuchhal | 0:94f21066fc43 | 12 | mbed import mbed-os-example-blinky |
architmuchhal | 0:94f21066fc43 | 13 | cd mbed-os-example-blinky |
architmuchhal | 0:94f21066fc43 | 14 | ``` |
architmuchhal | 0:94f21066fc43 | 15 | |
architmuchhal | 0:94f21066fc43 | 16 | ### Now compile |
architmuchhal | 0:94f21066fc43 | 17 | |
architmuchhal | 0:94f21066fc43 | 18 | Invoke `mbed compile`, and specify the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5: |
architmuchhal | 0:94f21066fc43 | 19 | |
architmuchhal | 0:94f21066fc43 | 20 | ``` |
architmuchhal | 0:94f21066fc43 | 21 | mbed compile -m K64F -t ARM |
architmuchhal | 0:94f21066fc43 | 22 | ``` |
architmuchhal | 0:94f21066fc43 | 23 | |
architmuchhal | 0:94f21066fc43 | 24 | Your PC may take a few minutes to compile your code. At the end, you see the following result: |
architmuchhal | 0:94f21066fc43 | 25 | |
architmuchhal | 0:94f21066fc43 | 26 | ``` |
architmuchhal | 0:94f21066fc43 | 27 | [snip] |
architmuchhal | 0:94f21066fc43 | 28 | +----------------------------+-------+-------+------+ |
architmuchhal | 0:94f21066fc43 | 29 | | Module | .text | .data | .bss | |
architmuchhal | 0:94f21066fc43 | 30 | +----------------------------+-------+-------+------+ |
architmuchhal | 0:94f21066fc43 | 31 | | Misc | 13939 | 24 | 1372 | |
architmuchhal | 0:94f21066fc43 | 32 | | core/hal | 16993 | 96 | 296 | |
architmuchhal | 0:94f21066fc43 | 33 | | core/rtos | 7384 | 92 | 4204 | |
architmuchhal | 0:94f21066fc43 | 34 | | features/FEATURE_IPV4 | 80 | 0 | 176 | |
architmuchhal | 0:94f21066fc43 | 35 | | frameworks/greentea-client | 1830 | 60 | 44 | |
architmuchhal | 0:94f21066fc43 | 36 | | frameworks/utest | 2392 | 512 | 292 | |
architmuchhal | 0:94f21066fc43 | 37 | | Subtotals | 42618 | 784 | 6384 | |
architmuchhal | 0:94f21066fc43 | 38 | +----------------------------+-------+-------+------+ |
architmuchhal | 0:94f21066fc43 | 39 | Allocated Heap: unknown |
architmuchhal | 0:94f21066fc43 | 40 | Allocated Stack: unknown |
architmuchhal | 0:94f21066fc43 | 41 | Total Static RAM memory (data + bss): 7168 bytes |
architmuchhal | 0:94f21066fc43 | 42 | Total RAM memory (data + bss + heap + stack): 7168 bytes |
architmuchhal | 0:94f21066fc43 | 43 | Total Flash memory (text + data + misc): 43402 bytes |
architmuchhal | 0:94f21066fc43 | 44 | Image: .\.build\K64F\ARM\mbed-os-example-blinky.bin |
architmuchhal | 0:94f21066fc43 | 45 | ``` |
architmuchhal | 0:94f21066fc43 | 46 | |
architmuchhal | 0:94f21066fc43 | 47 | ### Program your board |
architmuchhal | 0:94f21066fc43 | 48 | |
architmuchhal | 0:94f21066fc43 | 49 | 1. Connect your mbed device to the computer over USB. |
architmuchhal | 0:94f21066fc43 | 50 | 1. Copy the binary file to the mbed device. |
architmuchhal | 0:94f21066fc43 | 51 | 1. Press the reset button to start the program. |
architmuchhal | 0:94f21066fc43 | 52 | |
architmuchhal | 0:94f21066fc43 | 53 | The LED on your platform turns on and off. |
architmuchhal | 0:94f21066fc43 | 54 | |
architmuchhal | 0:94f21066fc43 | 55 | ## Export the project to Keil MDK, and debug your application |
architmuchhal | 0:94f21066fc43 | 56 | |
architmuchhal | 0:94f21066fc43 | 57 | From the command-line, run the following command: |
architmuchhal | 0:94f21066fc43 | 58 | |
architmuchhal | 0:94f21066fc43 | 59 | ``` |
architmuchhal | 0:94f21066fc43 | 60 | mbed export -m K64F -i uvision |
architmuchhal | 0:94f21066fc43 | 61 | ``` |
architmuchhal | 0:94f21066fc43 | 62 | |
architmuchhal | 0:94f21066fc43 | 63 | To debug the application: |
architmuchhal | 0:94f21066fc43 | 64 | |
architmuchhal | 0:94f21066fc43 | 65 | 1. Start uVision. |
architmuchhal | 0:94f21066fc43 | 66 | 1. Import the uVision project generated earlier. |
architmuchhal | 0:94f21066fc43 | 67 | 1. Compile your application, and generate an `.axf` file. |
architmuchhal | 0:94f21066fc43 | 68 | 1. Make sure uVision is configured to debug over CMSIS-DAP (From the Project menu > Options for Target '...' > Debug tab > Use CMSIS-DAP Debugger). |
architmuchhal | 0:94f21066fc43 | 69 | 1. Set breakpoints, and start a debug session. |
architmuchhal | 0:94f21066fc43 | 70 | |
architmuchhal | 0:94f21066fc43 | 71 | ![Image of uVision](img/uvision.png) |
architmuchhal | 0:94f21066fc43 | 72 | |
architmuchhal | 0:94f21066fc43 | 73 | ## Troubleshooting |
architmuchhal | 0:94f21066fc43 | 74 | |
architmuchhal | 0:94f21066fc43 | 75 | 1. Make sure `mbed-cli` is working correctly and its version is `>1.0.0` |
architmuchhal | 0:94f21066fc43 | 76 | |
architmuchhal | 0:94f21066fc43 | 77 | ``` |
architmuchhal | 0:94f21066fc43 | 78 | mbed --version |
architmuchhal | 0:94f21066fc43 | 79 | ``` |
architmuchhal | 0:94f21066fc43 | 80 | |
architmuchhal | 0:94f21066fc43 | 81 | If not, you can update it: |
architmuchhal | 0:94f21066fc43 | 82 | |
architmuchhal | 0:94f21066fc43 | 83 | ``` |
architmuchhal | 0:94f21066fc43 | 84 | pip install mbed-cli --upgrade |
architmuchhal | 0:94f21066fc43 | 85 | ``` |
architmuchhal | 0:94f21066fc43 | 86 | |
architmuchhal | 0:94f21066fc43 | 87 | 2. If using Keil MDK, make sure you have a license installed. [MDK-Lite](http://www.keil.com/arm/mdk.asp) has a 32 KB restriction on code size. |