PROGRAMA PARA LEER EL ANCHO DE UN PULSO QUE ENTRA POR UN PUERTO DIGITAL, USELO EN UN DATO DE TIEMPO IRDA. en este caso se emplea para el control del videobeam de el aula
Fork of irda1 by
main.cpp
- Committer:
- tony63
- Date:
- 2013-11-07
- Revision:
- 0:74d57f8ae247
- Child:
- 2:6a15ab0305c8
File content as of revision 0:74d57f8ae247:
#include "mbed.h" #include <Pulse1.h> PulseInOut irda(PTD5); Serial pc(USBTX, USBRX); DigitalOut led(LED1); int tiempo; int main(){ while(1){ tiempo = irda.read_high_us(); led=1; pc.printf("Header bajo dura %d us\n", tiempo); wait(0.3); led=0; } }