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
00001 #include "mbed.h" 00002 #include "USBSerial.h" 00003 00004 DigitalOut led1(LED1); 00005 USBSerial usbSerial; 00006 00007 /** 00008 * @brief 00009 * @note 00010 * @param 00011 * @retval 00012 */ 00013 int main() 00014 { 00015 printf("Starting ...\r\n"); 00016 led1 = 1; // The onboard LED is active when digital output is 0 00017 while (true) { 00018 led1 = 0; // turn the LED on 00019 ThisThread::sleep_for(50); 00020 led1 = 1; // turn the LED off 00021 ThisThread::sleep_for(1000); 00022 printf("Blink\r\n"); 00023 usbSerial.printf("I am a USB serial port\r\n"); // 12 Mbit/s (USB full-speed) 00024 } 00025 }
Generated on Thu Jul 14 2022 05:05:05 by
1.7.2