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:19ca1693f47b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Jan 08 22:58:42 2019 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+
+
+InterruptIn myinterrupt(PC9);
+
+DigitalIn mybutton(PC10);
+
+DigitalOut myled(LED1);
+DigitalOut otherled(LED0);
+
+Ticker myticker;
+
+void ledToggle()
+{
+ myled.write(!myled);
+ //printf("Toggle");
+}
+
+void ledToggle2()
+{
+ otherled.write(!otherled);
+}
+
+int main()
+{
+ myticker.attach(&ledToggle2, 2.0);
+
+ myinterrupt.fall(&ledToggle);
+ myinterrupt.rise(&ledToggle);
+
+ while(1){
+
+
+
+ //otherled.write(1);
+ //wait(1);
+ //otherled.write(0);
+ //wait(1);
+
+
+ }
+}
\ No newline at end of file