tsmp1138 ir led transmitter demo

Dependencies:   mbed

main.cpp

Committer:
cstevens
Date:
2014-05-21
Revision:
0:0f4b530d91d5

File content as of revision 0:0f4b530d91d5:

#include "mbed.h"

DigitalOut myled(LED1);
Serial pc(USBTX,USBRX);
Serial IRTX(PTC4,PTC3); // TX,RX
DigitalOut Ipower(PTC12); // pin to power the irda

int main() {
// power the irda electronics on
int i=0;
Ipower=1;
for(i=0;i<5;i++){
myled=0;
pc.printf("Sending %d\n\r",i);
IRTX.printf("Hello IRDA    \r");
myled=1;
wait(0.2);
}

}