Test
Revision 0:f92fadf3c5a3, committed 2019-03-22
- Comitter:
- ouleiqi
- Date:
- Fri Mar 22 07:14:00 2019 +0000
- Commit message:
- Test
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-src.lib | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Mar 22 07:14:00 2019 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +Serial pc(PA_2, PA_3); // TX, RX +DigitalOut myled(PC_13); // on-board LED + +int main() +{ + while(1) { + // The on-board LED is connected via a resistor to +3.3V (not to GND). + // So the LED is active on 0 + myled = 0; // turn the LED on + wait_ms(200); // wait 200 millisecond + myled = 1; // turn the LED off + pc.printf("Blink\r\n"); + wait_ms(1000); // wait 1000 millisecond + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-src.lib Fri Mar 22 07:14:00 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/rs27/code/mbed-src/#8a0b45cd594f