@Sunseeker According to the Connecting the Radio page, D2 is the default pin for the CE signal for the NRF24. If you'd like to use this pin for I2C, you can free it up by assigning a different pin for the CE signal by adding this line to your sketch:
#define MY_RF24_CE_PIN pin
IIRC, all available pins should work for this purpose (D0, D3, D4). Just pick one and if it doesn't work, use one of the other pins. Please make sure to add that line before #include <MySensors.h>.
Added sketch, which also supports an additional mini PIR sensor. It's what I needed, you can comment to #define out.
Also changed the regulator to a smaller one, which supplies up to 100 milli Amp, which is plenty enough. That way I can keep the circuit smaller on the PCB. Which allows me to create a smaller housing.
@Ron said in Capacitive Soil Moisture Sensor:
@Puneit-Thukral Thanks. I am not quite sure, so correct me please if I am wrong, but I think I am already using the MiniCore bootloader with platformIO. Or do I need to configure to explicitly use the MiniCore bootloaders? Also I have set BOD to disabled as I read somewhere that no BOD can also save battery.
hi
I'm not sure, but I believe I'm already using the MiniCore bootloader with platformIO. Please tell me if I'm incorrect. Is it necessary to set the MiniCore bootloaders explicitly?
I think you can just set the I2C pins in MyBoardNRF5.h without remapping the pins in MyBoardNRF5.cpp.
Look in MyBoardNRF5.h, under the Wire Interfaces section. Set SDL and SCA to 30 and 31 as appropriate for your board.