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.
Fork of mbed-os-example-mbed5-blinky by
Revision 46:81c79481f73b, committed 2017-09-26
- Comitter:
- gorazdko
- Date:
- Tue Sep 26 21:02:30 2017 +0000
- Parent:
- 45:d007f1c934db
- Commit message:
- testn iprogram za domel; izpisuje 88 02 00 03
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 15 07:45:03 2017 +0100
+++ b/main.cpp Tue Sep 26 21:02:30 2017 +0000
@@ -2,11 +2,44 @@
DigitalOut led1(LED1);
+
+Serial pc(/*USBTX*/ UART_TX, /*USBRX*/ UART_RX, 9600); // tx, rx
+
+
// main() runs in its own thread in the OS
int main() {
while (true) {
+
led1 = !led1;
- wait(0.5);
+ wait(2.0);
+ led1 = !led1;
+
+
+ uint8_t ch = 0x88;
+ pc.printf("%c", ch);
+
+ ch = 0x02;
+ pc.printf("%c", ch);
+
+ ch = 0x00;
+ pc.printf("%c", ch);
+
+ ch = 0x03;
+ pc.printf("%c", ch);
+
+ led1 = !led1;
+
+
+
+ wait(10.0);
+
+
+
+
+
+
+
+
}
}
