Guest User

pcvolumecomdisplay

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