Skip to content

Update README.md #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 1 addition & 60 deletions Alarm/README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1 @@
## Alarm example using Mbed OS

This guide reviews the steps required to build and run a basic alarm application on an Mbed OS platform.

Please install [Mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).

### Import the example application

From the command-line, import the example:

```
mbed import mbed-os-example-alarm
cd mbed-os-example-alarm
```

#### Now compile

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:

```
mbed compile -m K64F -t ARM
```

Your PC may take a few minutes to compile your code. At the end, you see the following result:

```
[snip]
| Module | .text | .data | .bss |
|----------------------|---------------|-----------|-------------|
| [lib]/dl7M_tlf.a | 10780(+10780) | 364(+364) | 716(+716) |
| [lib]/dlpp7M_tl_fc.a | 84(+84) | 0(+0) | 0(+0) |
| [lib]/m7M_tls.a | 2358(+2358) | 0(+0) | 0(+0) |
| [lib]/rt7M_tl.a | 1194(+1194) | 0(+0) | 0(+0) |
| [misc] | 215(+215) | 0(+0) | 0(+0) |
| main.o | 820(+820) | 0(+0) | 200(+200) |
| mbed-os/drivers | 490(+490) | 0(+0) | 0(+0) |
| mbed-os/features | 114(+114) | 0(+0) | 184(+184) |
| mbed-os/hal | 2070(+2070) | 8(+8) | 132(+132) |
| mbed-os/platform | 2938(+2938) | 112(+112) | 176(+176) |
| mbed-os/rtos | 8928(+8928) | 168(+168) | 6437(+6437) |
| mbed-os/targets | 10174(+10174) | 20(+20) | 1018(+1018) |
| Subtotals | 40165(+40165) | 672(+672) | 8863(+8863) |
Total Static RAM memory (data + bss): 9535(+9535) bytes
Total Flash memory (text + data): 40837(+40837) bytes

Image: ./BUILD/K64F/IAR/mbed-os-example-alarm.bin
```

#### Program your board

1. Connect your Mbed device to the computer over USB.
1. Copy the binary file to the Mbed device.
1. Press the reset button to start the program.
1. Press **Button1** for the number of desired hours to delay. Press **Button2** to cycle to minutes, and repeat the previous step for the number of desired minutes.
1. Press **Button2** again to start the alarm.
1. Press **Button2** again once the alarm triggers to silence it. Both an LED and a digital out pin will go high on the alarm trigger and go back low on an alarm reset.

### Troubleshooting

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.
To see this example in context, please see its [published documentation](https://os.mbed.com/docs/mbed-os/latest/tutorials/alarm-tutorial.html).