lab1 part1 pushbutton with red led

Dependencies:   mbed PinDetect

Files at this revision

API Documentation at this revision

Comitter:
mus3
Date:
Tue Sep 06 05:00:07 2022 +0000
Commit message:
lab1 part1 code

Changed in this revision

PinDetect.lib Show annotated file Show diff for this revision Revisions of this file
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/PinDetect.lib	Tue Sep 06 05:00:07 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/AjK/code/PinDetect/#cb3afc45028b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Sep 06 05:00:07 2022 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+#include "PinDetect.h"
+
+DigitalOut red(p5);
+DigitalIn pblight(p8);
+
+int main() {
+    pblight.mode(PullUp);
+    wait(0.001);
+    while(1) {
+        red = !pblight;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Sep 06 05:00:07 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file