Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@0:a29090b0a895, 2021-12-08 (annotated)
- Committer:
- bambusel
- Date:
- Wed Dec 08 08:04:12 2021 +0000
- Revision:
- 0:a29090b0a895
- Child:
- 1:27f896032e0c
JA
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| bambusel | 0:a29090b0a895 | 1 | /* mbed Microcontroller Library |
| bambusel | 0:a29090b0a895 | 2 | * Copyright (c) 2019 ARM Limited |
| bambusel | 0:a29090b0a895 | 3 | * SPDX-License-Identifier: Apache-2.0 |
| bambusel | 0:a29090b0a895 | 4 | */ |
| bambusel | 0:a29090b0a895 | 5 | |
| bambusel | 0:a29090b0a895 | 6 | #include "mbed.h" |
| bambusel | 0:a29090b0a895 | 7 | #include "platform/mbed_thread.h" |
| bambusel | 0:a29090b0a895 | 8 | #include "MFS.h" |
| bambusel | 0:a29090b0a895 | 9 | |
| bambusel | 0:a29090b0a895 | 10 | // Blinking rate in milliseconds |
| bambusel | 0:a29090b0a895 | 11 | #define BLINKING_RATE_MS 500 |
| bambusel | 0:a29090b0a895 | 12 | |
| bambusel | 0:a29090b0a895 | 13 | MFS display; |
| bambusel | 0:a29090b0a895 | 14 | char seg7[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F}; |
| bambusel | 0:a29090b0a895 | 15 | int main() |
| bambusel | 0:a29090b0a895 | 16 | { |
| bambusel | 0:a29090b0a895 | 17 | // Initialise the digital pin LED1 as an output |
| bambusel | 0:a29090b0a895 | 18 | DigitalOut led(LED1); |
| bambusel | 0:a29090b0a895 | 19 | |
| bambusel | 0:a29090b0a895 | 20 | while (true) { |
| bambusel | 0:a29090b0a895 | 21 | for(int i=0; i<10; i++){ |
| bambusel | 0:a29090b0a895 | 22 | display=0x1000+seg7[i]; |
| bambusel | 0:a29090b0a895 | 23 | HAL_Delay(500); |
| bambusel | 0:a29090b0a895 | 24 | display=0x2000+seg7[0]; |
| bambusel | 0:a29090b0a895 | 25 | HAL_Delay(500); |
| bambusel | 0:a29090b0a895 | 26 | } |
| bambusel | 0:a29090b0a895 | 27 | } |
| bambusel | 0:a29090b0a895 | 28 | } |