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:41518d1f552d, committed 2015-02-14
- Comitter:
- mbedschool
- Date:
- Sat Feb 14 04:56:34 2015 +0000
- Commit message:
- ticker
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 Feb 14 04:56:34 2015 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+Ticker flipper;
+DigitalOut led1(LED1);
+bool c=false;
+void flip() {
+ while (!c) {
+ led1 = !led1;
+ }
+ led1=1;
+}
+
+int main() {
+
+ flipper.attach(&flip, 2.0); // the address of the function to be attached (flip) and the interval (2 seconds)
+ // spin in a main loop. flipper will interrupt it to call flip
+ while(1) {
+ unsigned long n=100000000;
+ float x=0;
+ while(x*x <n)
+ x = x + 0.01 ;
+ c=true;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Feb 14 04:56:34 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e188a91d3eaa \ No newline at end of file