Deimos IO4 GPIO control example

main.cpp

Committer:
rmir2
Date:
2019-04-04
Revision:
94:1ab3e0f051e2
Parent:
88:bea4f2daa48c

File content as of revision 94:1ab3e0f051e2:

//Este programa activa y desactiva de forma intermitente el LED y la GPIO4

#include "mbed.h"

DigitalOut pin4(IO4);
DigitalOut led1(LED1);

int main()
{
    while(1) {
        pin4 = 1;
        led1 = 1;
        wait(0.2);
        pin4 = 0;
        led1 = 0;
        wait(0.2);
    }
}