Test access to PA0 on MDot

Dependencies:   mbed

Test.cpp

Committer:
Roietronics
Date:
2016-10-20
Revision:
0:c0f9993af516
Child:
1:879ca9867ac9

File content as of revision 0:c0f9993af516:

#include "mbed.h"
#include "MTSLog.h"

DigitalInOut myPort(PA_0);
//DigitalOut myPort(PA_0);
//DigitalIn myPort(PA_0);
Serial debug(USBTX, USBRX);

main()
{
    int i;
    debug.baud(115200);
    mts::MTSLog::setLogLevel(mts::MTSLog::INFO_LEVEL);
    for(i=0; i<500; i++)
    {
        
    myPort.output();
//    myPort = 1;
//    wait(500);
    myPort = 0;
    wait(500);
    myPort.input();
    i = myPort;
    logInfo("PA0 value: %d", i);
    }
}