I've got a problem with IRremote and arduino Nano.
I try to find a solution online, but it seems I'm the only with this problem.
IRremote is supposed to use the pin 9 (or 6 or 3) for the output, but in my case after several attempts I found the library use the pin D0 (RX) for the output.
This is a problem, because it works fine, but I've to disconnect the led to program the board.
There is a way to change the output PIN of IRremote for Nano?
I use a classic Nano...is not original, but it works fine with everything else.
I try to test all the pins with an oscilloscope, but only the RX0 pin has a signal output on it.
The circuit is really simple: only the board and only 1 IR led (with resistance)....but even only board does works only on RX0 pin.
The default send pin for a Nano with the IRremote library is pin 3. You should be able to change it with: #define IR_SEND_PIN x // where x is the pin number to use for sending
The above must be before the #include <IRremote.hpp> line to take effect.
Actually I notice that when I load the script, IDE give me this message....but it does not set it as an error.
C:\Users\Admin\Documents\arduino\poligono_RF_RX\poligono_RF_RX.ino: In function 'void fireShot()':
C:\Users\Admin\Documents\arduino\poligono_RF_RX\poligono_RF_RX.ino:176:29: warning: 'void IRsend::sendSony(long unsigned int, int)' is deprecated: This old function sends MSB first! Please use sendSony(aAddress, aCommand, aNumberOfRepeats). [-Wdeprecated-declarations]
irSend.sendSony(packet, 17);
^
In file included from C:\Users\Admin\Documents\Arduino\libraries\IRremote\src/IRremote.h:182:0,
from C:\Users\Admin\Documents\arduino\poligono_RF_RX\poligono_RF_RX.ino:3:
C:\Users\Admin\Documents\Arduino\libraries\IRremote\src/IRremoteInt.h:502:10: note: declared here