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@0:016968e54f88, 2019-03-09 (annotated)
- Committer:
- kemalicecek
- Date:
- Sat Mar 09 00:13:21 2019 +0000
- Revision:
- 0:016968e54f88
- Child:
- 1:97d5e01d84c5
initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kemalicecek | 0:016968e54f88 | 1 | #include "mbed.h" |
kemalicecek | 0:016968e54f88 | 2 | |
kemalicecek | 0:016968e54f88 | 3 | Serial pc(USBTX, USBRX); // tx, rx |
kemalicecek | 0:016968e54f88 | 4 | |
kemalicecek | 0:016968e54f88 | 5 | InterruptIn mybutton(USER_BUTTON); |
kemalicecek | 0:016968e54f88 | 6 | DigitalOut myled(LED1); |
kemalicecek | 0:016968e54f88 | 7 | DigitalOut extled(PC_0); |
kemalicecek | 0:016968e54f88 | 8 | |
kemalicecek | 0:016968e54f88 | 9 | int main(){ |
kemalicecek | 0:016968e54f88 | 10 | while (1){ |
kemalicecek | 0:016968e54f88 | 11 | if (mode == 0){ |
kemalicecek | 0:016968e54f88 | 12 | pc.printf("short\r\n"); |
kemalicecek | 0:016968e54f88 | 13 | wait(1); |
kemalicecek | 0:016968e54f88 | 14 | } |
kemalicecek | 0:016968e54f88 | 15 | else{ |
kemalicecek | 0:016968e54f88 | 16 | pc.printf("long\r\n"); |
kemalicecek | 0:016968e54f88 | 17 | wait(1); |
kemalicecek | 0:016968e54f88 | 18 | } |
kemalicecek | 0:016968e54f88 | 19 | } |
kemalicecek | 0:016968e54f88 | 20 | } |