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.
blinky.cpp
00001 /* mbed Microcontroller Library 00002 * Copyright (c) 2019 ARM Limited 00003 * SPDX-License-Identifier: Apache-2.0 00004 */ 00005 #ifdef MBED_BLINKY_EXAMPLE 00006 #ifndef MBED_TEST_MODE 00007 #include "mbed.h" 00008 00009 // Blinking rate in milliseconds 00010 #define BLINKING_RATE_MS 500 00011 00012 int main() 00013 { 00014 // Initialise the digital pin LED1 as an output 00015 DigitalOut led(LED1); 00016 00017 while (true) { 00018 led = !led; 00019 printf("Blinky\r\n"); 00020 ThisThread::sleep_for(BLINKING_RATE_MS); 00021 } 00022 } 00023 #endif /* MBED_TEST_MODE */ 00024 #endif /* MBED_BLINKY_EXAMPLE */
Generated on Sat Jul 23 2022 16:17:25 by
1.7.2