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.
Diff: main.cpp
- Revision:
- 0:642d6a23564c
diff -r 000000000000 -r 642d6a23564c main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Nov 14 02:29:10 2014 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+Ticker flipper;
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+
+void flip() {
+ led2 = !led2;
+}
+
+int main() {
+ int i = 0, j = 0;
+ led2 = 1;
+ flipper.attach(&flip, 1.0); // 割り込みの設定
+
+ while(1) {
+ led1 = !led1;
+ for(i = 0; i < 500000; i++) j = j * j;
+ wait(1.0);
+ }
+}
\ No newline at end of file