paul sugrue / Mbed 2 deprecated LAB1DI

Dependencies:   mbed

main.cpp

Committer:
psug
Date:
2020-04-22
Revision:
0:4e45225d3044

File content as of revision 0:4e45225d3044:

#include "mbed.h"

InterruptIn Down(p12);
InterruptIn Left(p13);
InterruptIn Center(p14);
InterruptIn Up(p15);
InterruptIn Right(p16);

int main(){
    printf("hello\r\n");
    while (1) {
        if (Down==1)
        printf("Down pressed\r\n");
        else if (Left==1)
        printf("Left pressed\r\n");
        else if (Center==1)
        printf("Center pressed\r\n");
        else if (Up==1)
        printf ("Up pressed\r\n");
        else if (Right==1)
        printf ("Right pressed\r\n");
        
        }
        }