practica_controlremoto

Dependencies:   Pulse1 TextLCD mbed

Fork of control_irda by Johana Cano Velez

Committer:
tony63
Date:
Thu Nov 07 03:34:46 2013 +0000
Revision:
0:74d57f8ae247
Child:
2:6a15ab0305c8
USELO EN UN PROGRAMA PARA LEER CODIGOS INFRARROJOS DE ALGUN CONTROL IRDA.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tony63 0:74d57f8ae247 1 #include "mbed.h"
tony63 0:74d57f8ae247 2 #include <Pulse1.h>
tony63 0:74d57f8ae247 3
tony63 0:74d57f8ae247 4 PulseInOut irda(PTD5);
tony63 0:74d57f8ae247 5 Serial pc(USBTX, USBRX);
tony63 0:74d57f8ae247 6 DigitalOut led(LED1);
tony63 0:74d57f8ae247 7 int tiempo;
tony63 0:74d57f8ae247 8
tony63 0:74d57f8ae247 9 int main(){
tony63 0:74d57f8ae247 10 while(1){
tony63 0:74d57f8ae247 11 tiempo = irda.read_high_us();
tony63 0:74d57f8ae247 12 led=1;
tony63 0:74d57f8ae247 13 pc.printf("Header bajo dura %d us\n", tiempo);
tony63 0:74d57f8ae247 14 wait(0.3);
tony63 0:74d57f8ae247 15 led=0;
tony63 0:74d57f8ae247 16
tony63 0:74d57f8ae247 17 }
tony63 0:74d57f8ae247 18 }