4180 LabTeam - Spring '18 / Mbed 2 deprecated 4180_Lab1_Part1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Nydrel
Date:
Thu Jan 18 02:17:11 2018 +0000
Parent:
2:c2f5a8ab5433
Child:
4:840b77c5f7c1
Commit message:
Change - Now the LED is inactive when the pushbutton is not being pressed

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Jan 18 02:15:24 2018 +0000
+++ b/main.cpp	Thu Jan 18 02:17:11 2018 +0000
@@ -6,6 +6,6 @@
 int main() {
     pb.mode(PullUp);
     while(1) {
-        myled = pb;
+        myled = !pb;
     }
 }
\ No newline at end of file