lab01-led-d0-flash

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2019 ARM Limited
00003  * SPDX-License-Identifier: Apache-2.0
00004  */
00005 
00006 #include "mbed.h"
00007 
00008 DigitalOut led(D0);
00009 
00010 int main()
00011 {
00012     while (true) {
00013         led = 1;   //led on
00014         thread_sleep_for(500);
00015         led = 0;   //led off
00016         thread_sleep_for(500);
00017     }
00018 }