Can I connect a Bluetooth module to usual digital pins, other than D0/D1 (RX/TX) pins as the shield is already using the D0 and D1 pins?
My Bluetooth module is an HC-05 MODULE.
Can I connect a Bluetooth module to usual digital pins, other than D0/D1 (RX/TX) pins as the shield is already using the D0 and D1 pins?
My Bluetooth module is an HC-05 MODULE.
Classic Arduinos use pins 0 and 1 for serial communication to the host computer, so it is problematic to connect a bluetooth module there anyway - it can be done, but basically means that programming the board and communicating with it by serial will not work (at least not reliably) until the interfering bluetooth module is removed or disabled. For these boards you need to use a software serial instance to talk to the module, and you can put it on most any digital pins.
ATmega32u4 boards like the Leonardo do not have debug/programming on pins 0 and 1 but do have a hardware UART there, so those would be the best choice for a bluetooth module, but you can still use software serial.
The Arduino Mega has additional hardware serial pins that would be good choices, but you can use software serial.
Various ARM based boards with Arduino ports typically have additional hardware serial pins which you should use. Software serial may or may not be an option on these (it's not that an implementation cannot exist, but that software serial is generally disadvantageous, so when a chip has more hardware UARTs that particular function may not be ported).
you can define pin and can use after defining int RX=any pin TX=any pin