Oledscreen program

Dependencies:   Adafruit-GFX-MbedOS6 Adafruit_SSD1331_MbedOS6

Committer:
macez
Date:
Tue Jan 19 11:35:27 2021 +0200
Revision:
0:f9d16642e61a
1st Commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
macez 0:f9d16642e61a 1 ![](./resources/official_armmbed_example_badge.png)
macez 0:f9d16642e61a 2 # Blinky Mbed OS example
macez 0:f9d16642e61a 3
macez 0:f9d16642e61a 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/).
macez 0:f9d16642e61a 5
macez 0:f9d16642e61a 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).
macez 0:f9d16642e61a 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).)
macez 0:f9d16642e61a 8
macez 0:f9d16642e61a 9 1. [Install Mbed CLI](https://os.mbed.com/docs/mbed-os/latest/quick-start/offline-with-mbed-cli.html).
macez 0:f9d16642e61a 10 1. From the command-line, import the example: `mbed import mbed-os-example-blinky`
macez 0:f9d16642e61a 11 1. Change the current directory to where the project was imported.
macez 0:f9d16642e61a 12
macez 0:f9d16642e61a 13 ## Application functionality
macez 0:f9d16642e61a 14
macez 0:f9d16642e61a 15 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.
macez 0:f9d16642e61a 16
macez 0:f9d16642e61a 17 ## Building and running
macez 0:f9d16642e61a 18
macez 0:f9d16642e61a 19 1. Connect a USB cable between the USB port on the board and the host computer.
macez 0:f9d16642e61a 20 1. Run the following command to build the example project and program the microcontroller flash memory:
macez 0:f9d16642e61a 21
macez 0:f9d16642e61a 22 ```bash
macez 0:f9d16642e61a 23 $ mbed compile -m <TARGET> -t <TOOLCHAIN> --flash
macez 0:f9d16642e61a 24 ```
macez 0:f9d16642e61a 25
macez 0:f9d16642e61a 26 Your PC may take a few minutes to compile your code.
macez 0:f9d16642e61a 27
macez 0:f9d16642e61a 28 The binary is located at `./BUILD/<TARGET>/<TOOLCHAIN>/mbed-os-example-blinky.bin`.
macez 0:f9d16642e61a 29
macez 0:f9d16642e61a 30 Alternatively, you can manually copy the binary to the board, which you mount on the host computer over USB.
macez 0:f9d16642e61a 31
macez 0:f9d16642e61a 32 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:
macez 0:f9d16642e61a 33
macez 0:f9d16642e61a 34 ```bash
macez 0:f9d16642e61a 35 $ mbed compile -S
macez 0:f9d16642e61a 36 ```
macez 0:f9d16642e61a 37
macez 0:f9d16642e61a 38 ## Expected output
macez 0:f9d16642e61a 39 The LED on your target turns on and off every 500 milliseconds.
macez 0:f9d16642e61a 40
macez 0:f9d16642e61a 41
macez 0:f9d16642e61a 42 ## Troubleshooting
macez 0:f9d16642e61a 43 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.
macez 0:f9d16642e61a 44
macez 0:f9d16642e61a 45 ## Related Links
macez 0:f9d16642e61a 46
macez 0:f9d16642e61a 47 * [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html).
macez 0:f9d16642e61a 48 * [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html).
macez 0:f9d16642e61a 49 * [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html).
macez 0:f9d16642e61a 50 * [Mbed OS bare metal](https://os.mbed.com/docs/mbed-os/latest/reference/mbed-os-bare-metal.html).
macez 0:f9d16642e61a 51 * [Mbed boards](https://os.mbed.com/platforms/).
macez 0:f9d16642e61a 52
macez 0:f9d16642e61a 53 ### License and contributions
macez 0:f9d16642e61a 54
macez 0:f9d16642e61a 55 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.
macez 0:f9d16642e61a 56
macez 0:f9d16642e61a 57 This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.