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:aa53fb697a82, 2018-11-28 (annotated)
- Committer:
- henkbaams
- Date:
- Wed Nov 28 16:40:03 2018 +0000
- Revision:
- 0:aa53fb697a82
Test
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| henkbaams | 0:aa53fb697a82 | 1 | #include "mbed.h" |
| henkbaams | 0:aa53fb697a82 | 2 | /* |
| henkbaams | 0:aa53fb697a82 | 3 | * All the LEDs on the micro:bit are part of the LED Matrix, |
| henkbaams | 0:aa53fb697a82 | 4 | * In order to get simple blinking behaviour, we set column 0 |
| henkbaams | 0:aa53fb697a82 | 5 | * to be permanently at ground. If you want to use the LEDs as |
| henkbaams | 0:aa53fb697a82 | 6 | * a screen, there is a display driver in the micro:bit 'DAL', |
| henkbaams | 0:aa53fb697a82 | 7 | */ |
| henkbaams | 0:aa53fb697a82 | 8 | DigitalOut col0(P0_4, 0); |
| henkbaams | 0:aa53fb697a82 | 9 | |
| henkbaams | 0:aa53fb697a82 | 10 | DigitalOut myled(P0_13); |
| henkbaams | 0:aa53fb697a82 | 11 | |
| henkbaams | 0:aa53fb697a82 | 12 | int main() { |
| henkbaams | 0:aa53fb697a82 | 13 | while(1) { |
| henkbaams | 0:aa53fb697a82 | 14 | myled = 1; |
| henkbaams | 0:aa53fb697a82 | 15 | wait(0.2); |
| henkbaams | 0:aa53fb697a82 | 16 | myled = 0; |
| henkbaams | 0:aa53fb697a82 | 17 | wait(0.2); |
| henkbaams | 0:aa53fb697a82 | 18 | } |
| henkbaams | 0:aa53fb697a82 | 19 | } |