ECE 4180 / Mbed 2 deprecated 4180_L1_P1

Dependencies:   mbed

Committer:
glanier9
Date:
Thu Jan 21 17:06:43 2021 +0000
Revision:
2:3ca6379931dd
Parent:
1:f7aaf003cd11
Update to the comment

Who changed what in which revision?

UserRevisionLine numberNew contents of line
glanier9 0:f1fe3296c466 1 // 4180 Lab 1, Part 1
glanier9 0:f1fe3296c466 2 // Gregory Lanier
glanier9 0:f1fe3296c466 3
glanier9 0:f1fe3296c466 4 #include "mbed.h"
glanier9 0:f1fe3296c466 5
glanier9 0:f1fe3296c466 6 /*
glanier9 0:f1fe3296c466 7 This program lights up an LED with a pushbutton input.
glanier9 0:f1fe3296c466 8 */
glanier9 0:f1fe3296c466 9
glanier9 0:f1fe3296c466 10 DigitalIn button(p8); // Turn on LED with button p8
glanier9 0:f1fe3296c466 11 DigitalOut redLED(p21); // Light up LED with pin 21
glanier9 0:f1fe3296c466 12
glanier9 0:f1fe3296c466 13 int main()
glanier9 0:f1fe3296c466 14 {
glanier9 0:f1fe3296c466 15 button.mode(PullUp);
glanier9 0:f1fe3296c466 16 while(1)
glanier9 0:f1fe3296c466 17 {
glanier9 0:f1fe3296c466 18 redLED = !button;
glanier9 0:f1fe3296c466 19 }
glanier9 0:f1fe3296c466 20 }
ahoffman41 1:f7aaf003cd11 21
ahoffman41 1:f7aaf003cd11 22
glanier9 2:3ca6379931dd 23 // this is a test
glanier9 2:3ca6379931dd 24
glanier9 2:3ca6379931dd 25 // This is another test