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.
Dependencies: mbed
Fork of frdm_timer by
Revision 0:5e8c7a36cb58, committed 2012-10-12
- Comitter:
- chris
- Date:
- Fri Oct 12 13:03:56 2012 +0000
- Child:
- 1:15681077dea3
- Commit message:
- First commit
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed-KL25Z.lib | 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 Fri Oct 12 13:03:56 2012 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+Ticker tick;
+DigitalOut led1(LED_RED);
+DigitalOut led2(LED_GREEN);
+
+void flip()
+{
+ led2 = !led2;
+}
+
+int main()
+{
+ tick.attach(&flip, 0.7); // setup ticker to call flip led2 after 0.7 seconds
+
+ // spin in a main loop.
+ while(1) {
+ led1 = !led1;
+ wait (0.3); // flip led1 every 0.3 seconds
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-KL25Z.lib Fri Oct 12 13:03:56 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/emilmont/code/mbed-KL25Z/#0d4e7384bff6
