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:dce6037f5901, committed 2018-07-09
- Comitter:
- MarkAntony
- Date:
- Mon Jul 09 23:17:01 2018 +0000
- Commit message:
- testing mbed-cli import functions
Changed in this revision
| main.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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jul 09 23:17:01 2018 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX); // tx, rx
+DigitalOut MyLed1(LED1);
+
+int main()
+{
+pc.baud(9600);
+ while(1) {
+ printf ("Characters: %c %c \n\r", 'a', 65);
+ printf ("Decimals: %d %ld\n\r", 1977, 650000L);
+ // Reverse video:
+ //printf ("\033[7m");
+ printf ("Preceding with blanks: %10d \n\r", 1977);
+ printf ("Preceding with zeros: %010d \n\r", 1977);
+ printf ("Some different radixes: %d %x %o %#x %#o \n\r", 100, 100, 100, 100, 100);
+ printf ("floats: %4.2f %+.0e %E \n\r", 3.1416, 3.1416, 3.1416);
+ printf ("Width trick: %*d \n\r", 5, 10);
+ printf ("%s \n\r", "A string");
+ //Clear screen upwards
+ //printf ("\033[1J");
+ MyLed1 = !MyLed1;
+ wait(1.0);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jul 09 23:17:01 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/a7c7b631e539 \ No newline at end of file