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:d3ea274bc4c5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun May 22 20:10:52 2022 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+InterruptIn button(p5);
+DigitalOut led(LED1);
+DigitalOut flash(LED2);
+void flip(){
+ led=1;
+ wait(0.2);
+ led=0;
+ wait(0.2);
+ }
+
+int main() {
+ button.rise(&flip);
+ while(1) {
+ flash = 1;
+ wait(0.2);
+ led = 0;
+ wait(0.2);
+ }
+}