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:9dccd331cbdc, committed 2014-09-03
- Comitter:
- homayoun
- Date:
- Wed Sep 03 10:59:19 2014 +0000
- Commit message:
- Arduino_BlinkWithoutDelay_Timer sample code ported.
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 |
diff -r 000000000000 -r 9dccd331cbdc main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Sep 03 10:59:19 2014 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+Timer t;
+int interval = 1000;
+
+void setup()
+{
+ t.start();
+}
+
+void loop()
+{
+ if(t.read_ms() > interval) {
+ t.reset();
+ myled = !myled;
+ }
+}
+
+int main()
+{
+ setup();
+ while(1) loop();
+}
diff -r 000000000000 -r 9dccd331cbdc mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Sep 03 10:59:19 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013 \ No newline at end of file