void loop()
{
if (irrecv.decode(&results))
{
int value = results.value;
Serial.println(" ");
Serial.print("Code: ");
Serial.println(results.value); //prints the value a a button press
Serial.println(" ");
irrecv.resume(); // Receive the next value
Serial.println("*****************");
}
}
and yet, something seems incredibly off. I've tried multiple different IR remotes to decode to test if it was an issue with the remote I was given or what; they all do the same thing when I bring up the serial monitor.
here are some of the IR codes it's spit out, for example.
Code: 404189791
Code: 404189791
Code: 99832004
Code: 404189791
Code: 404189791
Code: 1536257714
Code: 404189791
Code: 2532405468
Code: 0
Code: 0
Code: 0
Code: 4239130559
Code: 0
Code: 1456440334
Code: 3677042839
Code: 155650165
this is all from the same button on the remote. every button does more or less the same thing(but with different codes), and other remotes I have around the same also do the same thing.
FWIW, the IR sensor is plugged into the 3.3v rather than the 5v that the instructions told me, but when I put it in the 5v, the IR receiver just doesn't work at all anyway. I can't figure out whats going on; issue with the code? the receiver? not compatible with the library I'm using?
Also post the part number of the IR receiver you are using and a link to the instructions you are following.
The 3.3volt / 5v story sounds strange and is likely to be a problem.
thats the best I can do, for the circuit. it seems like tinkercad uses IR receiver diodes only, while I'm using an IR breakout board that came with my starter kit, so my actual wiring is a tiny bit different.
as for the project; right now Its not being implemented into an actual project. I'm just using a breadboard to test code and learn how to use arduino - I'm extremely new at all of this.
So, that I actually figured out. there was a resistor mounted to the breadboard that was in series with the receiver that I didn't notice. My bad. 5v works fine now, but its still acting wonky and spitting out different codes.