mardi 30 novembre 2021

Arduino IR code not working (USING TINKERCAD)

ARDUINO PROBLEM

enter image description here

**So this is the circuit bord **

THE PROBLEM: when I try to run the code and try to press any button on the IR remote it does nothing ( it doesn't print the hexacode ! )

  • I have tried to change the circuit and tried to change the code. I was looking fro the arduino forums and tried every one, but still it doesn't work .
  • Is there a problem with tinkercad. simulation or is it with the code ?

CODE: https://pastebin.com/1Uhn1j3a

CODE:


#include <IRremote.h>

const int RECV_PIN = A5;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup(){
  Serial.begin(9600);
  irrecv.enableIRIn();
  irrecv.blink13(true);
}

void loop(){
  if (irrecv.decode(&results)){
        Serial.println(results.value, HEX);
        irrecv.resume();
  }
}

Aucun commentaire:

Enregistrer un commentaire