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.
Revision 0:c88449b6a93a, committed 2022-04-13
- Comitter:
- leejieun
- Date:
- Wed Apr 13 13:20:48 2022 +0000
- Commit message:
- practice 1
Changed in this revision
1.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r c88449b6a93a 1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/1.cpp Wed Apr 13 13:20:48 2022 +0000 @@ -0,0 +1,52 @@ +#include "mbed.h" +DigitalOut inLed(LED1); +DigitalOut exLed(PA_12); +DigitalIn inButton(PC_13); +DigitalIn exButton(PC_11); +Serial pc(SERIAL_TX, SERIAL_RX); +//Serial pc(PA_2, PA_3); +//Serial pc(USBTX, USBRX); + +DigitalOut myled(LED1); + +void WriteData(int event) +{ + myled = !myled; +} + + + +#define EX1 + +#ifdef EX1 +int main() +{ + pc.baud(115200); + + int i = 1; + int buffer = 0; + pc.printf("Hello World !\n"); + + while(1) { +// wait(1); +// pc.printf("This program runs since %d seconds.\n\r", 508); + if (0 == inButton && 0 == buffer && i == 1){ + pc.printf("Hello, I'm Yungu\n"); + buffer = 1; + i = 0; + } + if (1 == inButton){ + i = 1; + } + if (0 == inButton && 1 == buffer && i == 1){ + pc.printf("Hello, I'm Jieun\n"); + buffer = 0; + i = 0; + } + if (0 == exButton){ + pc.printf("Program end\n"); + break; + } + } +} +#endif \ No newline at end of file
diff -r 000000000000 -r c88449b6a93a mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Apr 13 13:20:48 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file