just a digital out

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mus3
Date:
Mon Sep 19 19:48:51 2022 +0000
Commit message:
lab2_part6 just one digitalout

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	Mon Sep 19 19:48:51 2022 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+
+DigitalOut relay(p5);
+
+int main() {
+    wait(0.001);
+    while(1) {
+        relay = 1;
+        wait(2);
+        relay = 0;
+        wait(2);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Sep 19 19:48:51 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file