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.
Dependencies: Adafruit_GFX TextLCD
main.cpp@0:9a306207c5b2, 2022-05-29 (annotated)
- Committer:
- diltech
- Date:
- Sun May 29 19:02:58 2022 -0400
- Revision:
- 0:9a306207c5b2
- Child:
- 1:a48de1514875
Initiate projet
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| diltech | 0:9a306207c5b2 | 1 | /* mbed Microcontroller Library |
| diltech | 0:9a306207c5b2 | 2 | * Copyright (c) 2019 ARM Limited |
| diltech | 0:9a306207c5b2 | 3 | * SPDX-License-Identifier: Apache-2.0 |
| diltech | 0:9a306207c5b2 | 4 | */ |
| diltech | 0:9a306207c5b2 | 5 | |
| diltech | 0:9a306207c5b2 | 6 | #include "mbed.h" |
| diltech | 0:9a306207c5b2 | 7 | |
| diltech | 0:9a306207c5b2 | 8 | |
| diltech | 0:9a306207c5b2 | 9 | // Blinking rate in milliseconds |
| diltech | 0:9a306207c5b2 | 10 | #define BLINKING_RATE 500ms |
| diltech | 0:9a306207c5b2 | 11 | |
| diltech | 0:9a306207c5b2 | 12 | |
| diltech | 0:9a306207c5b2 | 13 | int main() |
| diltech | 0:9a306207c5b2 | 14 | { |
| diltech | 0:9a306207c5b2 | 15 | // Initialise the digital pin LED1 as an output |
| diltech | 0:9a306207c5b2 | 16 | DigitalOut led(LED1); |
| diltech | 0:9a306207c5b2 | 17 | |
| diltech | 0:9a306207c5b2 | 18 | while (true) { |
| diltech | 0:9a306207c5b2 | 19 | led = !led; |
| diltech | 0:9a306207c5b2 | 20 | ThisThread::sleep_for(BLINKING_RATE); |
| diltech | 0:9a306207c5b2 | 21 | } |
| diltech | 0:9a306207c5b2 | 22 | } |