Control project for the Lift-arm. Works with ROS Melodic

Dependencies:   mbed Servo ros_lib_melodic ULN2003_StepperDriver Async_4pin_Stepper

Committer:
krogedal
Date:
Thu Jun 03 21:40:04 2021 +0000
Revision:
5:71c2f193a7f9
Parent:
0:441289ea4e29
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
krogedal 0:441289ea4e29 1 ![](./resources/official_armmbed_example_badge.png)
krogedal 0:441289ea4e29 2 # Blinky Mbed OS example
krogedal 0:441289ea4e29 3
krogedal 0:441289ea4e29 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/).
krogedal 0:441289ea4e29 5
krogedal 0:441289ea4e29 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).
krogedal 0:441289ea4e29 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).)
krogedal 0:441289ea4e29 8
krogedal 0:441289ea4e29 9 1. [Install Mbed CLI](https://os.mbed.com/docs/mbed-os/latest/quick-start/offline-with-mbed-cli.html).
krogedal 0:441289ea4e29 10
krogedal 0:441289ea4e29 11 1. Clone this repository on your system, and change the current directory to where the project was cloned:
krogedal 0:441289ea4e29 12
krogedal 0:441289ea4e29 13 ```bash
krogedal 0:441289ea4e29 14 $ git clone git@github.com:armmbed/mbed-os-example-blinky && cd mbed-os-example-blinky
krogedal 0:441289ea4e29 15 ```
krogedal 0:441289ea4e29 16
krogedal 0:441289ea4e29 17 Alternatively, you can download the example project with Arm Mbed CLI using the `import` subcommand:
krogedal 0:441289ea4e29 18
krogedal 0:441289ea4e29 19 ```bash
krogedal 0:441289ea4e29 20 $ mbed import mbed-os-example-blinky && cd mbed-os-example-blinky
krogedal 0:441289ea4e29 21 ```
krogedal 0:441289ea4e29 22
krogedal 0:441289ea4e29 23
krogedal 0:441289ea4e29 24 ## Application functionality
krogedal 0:441289ea4e29 25
krogedal 0:441289ea4e29 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.
krogedal 0:441289ea4e29 27
krogedal 0:441289ea4e29 28 ## Building and running
krogedal 0:441289ea4e29 29
krogedal 0:441289ea4e29 30 1. Connect a USB cable between the USB port on the board and the host computer.
krogedal 0:441289ea4e29 31 2. <a name="build_cmd"></a> Run the following command to build the example project and program the microcontroller flash memory:
krogedal 0:441289ea4e29 32 ```bash
krogedal 0:441289ea4e29 33 $ mbed compile -m <TARGET> -t <TOOLCHAIN> --flash
krogedal 0:441289ea4e29 34 ```
krogedal 0:441289ea4e29 35 The binary is located at `./BUILD/<TARGET>/<TOOLCHAIN>/mbed-os-example-blinky.bin`.
krogedal 0:441289ea4e29 36
krogedal 0:441289ea4e29 37 Alternatively, you can manually copy the binary to the board, which you mount on the host computer over USB.
krogedal 0:441289ea4e29 38
krogedal 0:441289ea4e29 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:
krogedal 0:441289ea4e29 40
krogedal 0:441289ea4e29 41 ```bash
krogedal 0:441289ea4e29 42 $ mbed compile -S
krogedal 0:441289ea4e29 43 ```
krogedal 0:441289ea4e29 44
krogedal 0:441289ea4e29 45 ## Expected output
krogedal 0:441289ea4e29 46 The LED on your target turns on and off every 500 milliseconds.
krogedal 0:441289ea4e29 47
krogedal 0:441289ea4e29 48
krogedal 0:441289ea4e29 49 ## Troubleshooting
krogedal 0:441289ea4e29 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.
krogedal 0:441289ea4e29 51
krogedal 0:441289ea4e29 52 ## Related Links
krogedal 0:441289ea4e29 53
krogedal 0:441289ea4e29 54 * [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html).
krogedal 0:441289ea4e29 55 * [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html).
krogedal 0:441289ea4e29 56 * [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html).
krogedal 0:441289ea4e29 57 * [Mbed OS bare metal](https://os.mbed.com/docs/mbed-os/latest/reference/mbed-os-bare-metal.html).
krogedal 0:441289ea4e29 58 * [Mbed boards](https://os.mbed.com/platforms/).
krogedal 0:441289ea4e29 59
krogedal 0:441289ea4e29 60 ### License and contributions
krogedal 0:441289ea4e29 61
krogedal 0:441289ea4e29 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.
krogedal 0:441289ea4e29 63
krogedal 0:441289ea4e29 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.