ECE 4180 / Mbed 2 deprecated 4180_L1_P1

Dependencies:   mbed

main.cpp

Committer:
ahoffman41
Date:
2021-01-21
Revision:
1:f7aaf003cd11
Parent:
0:f1fe3296c466
Child:
2:3ca6379931dd

File content as of revision 1:f7aaf003cd11:

//  4180 Lab 1, Part 1
//  Gregory Lanier

#include "mbed.h"

/*
    This program lights up an LED with a pushbutton input.
*/

DigitalIn   button(p8);     // Turn on LED with button p8
DigitalOut  redLED(p21);    // Light up LED with pin 21

int main() 
{
    button.mode(PullUp);
    while(1) 
    {
        redLED = !button;
    }
}


// this is a test