S2Project final failed code

Dependencies:   QEI TB6612 VL53L0X

Committer:
sas638
Date:
Thu Jan 27 22:46:00 2022 +0000
Revision:
0:bcce413163a4
used multi sensor

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sas638 0:bcce413163a4 1 ![](./resources/official_armmbed_example_badge.png)
sas638 0:bcce413163a4 2 # Blinky Mbed OS example
sas638 0:bcce413163a4 3
sas638 0:bcce413163a4 4 The example project is part of the [Arm Mbed OS Official Examples](https://os.mbed.com/code/) and is the [getting started example for Mbed OS](https://os.mbed.com/docs/mbed-os/v5.14/quick-start/index.html). It contains an application that repeatedly blinks an LED on supported [Mbed boards](https://os.mbed.com/platforms/).
sas638 0:bcce413163a4 5
sas638 0:bcce413163a4 6 You can build the project with all supported [Mbed OS build tools](https://os.mbed.com/docs/mbed-os/latest/tools/index.html). However, this example project specifically refers to the command-line interface tool [Arm Mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).
sas638 0:bcce413163a4 7 (Note: To see a rendered example you can import into the Arm Online Compiler, please see our [import quick start](https://os.mbed.com/docs/mbed-os/latest/quick-start/online-with-the-online-compiler.html#importing-the-code).)
sas638 0:bcce413163a4 8
sas638 0:bcce413163a4 9 1. [Install Mbed CLI](https://os.mbed.com/docs/mbed-os/latest/quick-start/offline-with-mbed-cli.html).
sas638 0:bcce413163a4 10
sas638 0:bcce413163a4 11 1. Clone this repository on your system, and change the current directory to where the project was cloned:
sas638 0:bcce413163a4 12
sas638 0:bcce413163a4 13 ```bash
sas638 0:bcce413163a4 14 $ git clone git@github.com:armmbed/mbed-os-example-blinky && cd mbed-os-example-blinky
sas638 0:bcce413163a4 15 ```
sas638 0:bcce413163a4 16
sas638 0:bcce413163a4 17 Alternatively, you can download the example project with Arm Mbed CLI using the `import` subcommand:
sas638 0:bcce413163a4 18
sas638 0:bcce413163a4 19 ```bash
sas638 0:bcce413163a4 20 $ mbed import mbed-os-example-blinky && cd mbed-os-example-blinky
sas638 0:bcce413163a4 21 ```
sas638 0:bcce413163a4 22
sas638 0:bcce413163a4 23
sas638 0:bcce413163a4 24 ## Application functionality
sas638 0:bcce413163a4 25
sas638 0:bcce413163a4 26 The `main()` function is the single thread in the application. It toggles the state of a digital output connected to an LED on the board.
sas638 0:bcce413163a4 27
sas638 0:bcce413163a4 28 ## Building and running
sas638 0:bcce413163a4 29
sas638 0:bcce413163a4 30 1. Connect a USB cable between the USB port on the board and the host computer.
sas638 0:bcce413163a4 31 2. <a name="build_cmd"></a> Run the following command to build the example project and program the microcontroller flash memory:
sas638 0:bcce413163a4 32 ```bash
sas638 0:bcce413163a4 33 $ mbed compile -m <TARGET> -t <TOOLCHAIN> --flash
sas638 0:bcce413163a4 34 ```
sas638 0:bcce413163a4 35 The binary is located at `./BUILD/<TARGET>/<TOOLCHAIN>/mbed-os-example-blinky.bin`.
sas638 0:bcce413163a4 36
sas638 0:bcce413163a4 37 Alternatively, you can manually copy the binary to the board, which you mount on the host computer over USB.
sas638 0:bcce413163a4 38
sas638 0:bcce413163a4 39 Depending on the target, you can build the example project with the `GCC_ARM`, `ARM` or `IAR` toolchain. After installing Arm Mbed CLI, run the command below to determine which toolchain supports your target:
sas638 0:bcce413163a4 40
sas638 0:bcce413163a4 41 ```bash
sas638 0:bcce413163a4 42 $ mbed compile -S
sas638 0:bcce413163a4 43 ```
sas638 0:bcce413163a4 44
sas638 0:bcce413163a4 45 ## Expected output
sas638 0:bcce413163a4 46 The LED on your target turns on and off every 500 milliseconds.
sas638 0:bcce413163a4 47
sas638 0:bcce413163a4 48
sas638 0:bcce413163a4 49 ## Troubleshooting
sas638 0:bcce413163a4 50 If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it.
sas638 0:bcce413163a4 51
sas638 0:bcce413163a4 52 ## Related Links
sas638 0:bcce413163a4 53
sas638 0:bcce413163a4 54 * [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html).
sas638 0:bcce413163a4 55 * [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html).
sas638 0:bcce413163a4 56 * [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html).
sas638 0:bcce413163a4 57 * [Mbed OS bare metal](https://os.mbed.com/docs/mbed-os/latest/reference/mbed-os-bare-metal.html).
sas638 0:bcce413163a4 58 * [Mbed boards](https://os.mbed.com/platforms/).
sas638 0:bcce413163a4 59
sas638 0:bcce413163a4 60 ### License and contributions
sas638 0:bcce413163a4 61
sas638 0:bcce413163a4 62 The software is provided under Apache-2.0 license. Contributions to this project are accepted under the same license. Please see contributing.md for more info.
sas638 0:bcce413163a4 63
sas638 0:bcce413163a4 64 This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.