Guest User

IrcodePCVolume_ArduiNO

a guest
Aug 27th, 2017
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1.  /*bem10jfx.blogspot.com*/
  2. #include <IRremote.h> //biblioteca
  3. int RECV_PIN = 7; //pino 7
  4. char in; //recebe os valores do resultado do pino 7 em char
  5. IRrecv irrecv(RECV_PIN);
  6. decode_results results;
  7. void setup()
  8. {
  9.   Serial.begin(9600);
  10.   irrecv.enableIRIn(); // inicia  
  11.  // Serial.println("receiver  true");  
  12. }
  13. void loop() {
  14.   if (irrecv.decode(&results)) {//se receber  codigo
  15.     in=results.value;//guardar valores recebido pelo controle
  16.     Serial.println(results.value);//imprime valor
  17.       irrecv.resume();  //finaliza para fazer uma nova procura
  18.   }
  19.   delay(100);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment