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:a550aef65fac, committed 2017-10-28
- Comitter:
- fabeltranm
- Date:
- Sat Oct 28 01:54:47 2017 +0000
- Child:
- 1:0f682b1c98ec
- Commit message:
- RTQ
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 Sat Oct 28 01:54:47 2017 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+
+
+Ticker tk1;
+Ticker tk2;
+DigitalOut output1(LED1); // digital output
+Serial serial(USBTX, USBRX);
+
+
+void task1(void); // task function prototype
+void task2(void); // task function prototype
+
+
+
+//*** main code
+
+void main() {
+ output1=0;
+ tk1.attach(&task1, 0.8);
+ tk2.attach(&task2, 0.6);
+ while(1) {
+ wait_ms(2000);
+ output1=!output1; // toggle output
+ }
+ }
+void task1(void){ // task function
+
+ serial.printf("hola soy task1\n");
+ wait_ms(300);
+
+
+}
+
+void task2(void){ // task function
+
+ serial.printf("hola soy task2\n");
+ wait_ms(300);
+
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Oct 28 01:54:47 2017 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/fb8e0ae1cceb \ No newline at end of file