Adafruit motorshield v2.3 and nrf module

So im making a project which includes 2 adafruit motorshield v2.3 each, and nrf pa/lna module all working together on the reciever side. Ideally they should be working right?

Well, when i first tested the setup, the nrf module was giving the desired output even after being connected on top of the, at that time, single stacked shield,
However, today i tried it again, and it stopped working. The nrf module is working fine whne connected directly to the arduino, however when i connect the motorshield and then the nrf module, it dosent recieve any data and gives 0 as output.

Then i tried to simply connect the motorshields using wires, they could be stacked and the stack can be connected using wires to the arduino right?
My connections were:-

Arduino. Motorshield
SDA. -> SDA
SCL. -> SCL
5v. -> 5V
Gnd. -> gnd

However as soon as i connected the SDA and SCL wires to the arduino, the nrf module just froze and stopped giving anyoutput whatsoever, and the moment i remove the pins, it starts working perfectly again.

Whats the problem here, i can provide more info if required....

Had you provided a schematic, as requested in How to get the best out of this forum, this question wouldn't be necessary: what pins are you using for the radio module's CE and CSN?

i used the general pins for the nrf module on both the transmitter and the receiver sides.


as you can see from the colour code:-
CE - dig 9
CSN - dig 10
SCK - dig13
MOSI - dig 11
MISO - dig 12
vcc - 5v (PA/LNA with the adapter requires 5v)
gnd - gnd

upon connecting the motor shield and then the nrf module, i ran a test to see if it was a receiver side issue or a transmitter side issue, and it is most definately a receiver side issue because i got this as the output:-

STATUS		= 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
RX_ADDR_P0-1	= 0x0000000000 0x0000000000
RX_ADDR_P2-5	= 0x00 0x00 0x00 0x00
TX_ADDR		= 0x0000000000
RX_PW_P0-6	= 0x00 0x00 0x00 0x00 0x00 0x00
EN_AA		= 0x00
EN_RXADDR	= 0x00
RF_CH		= 0x00
RF_SETUP	= 0x00
CONFIG		= 0x00
DYNPD/FEATURE	= 0x00 0x00
Data Rate	= 1 MBPS
Model		= nRF24L01+
CRC Length	= Disabled
PA Power	= PA_MIN
ARC		= 0


with VIN jumper attached


Without VIN jumper attached

both times i got the same result

by the way, the code i use to check my nrf modules functionability is this:-

/*
  If your serial output has these values same then Your nrf24l01 module is in working condition :
  
  EN_AA          = 0x3f
  EN_RXADDR      = 0x02
  RF_CH          = 0x4c
  RF_SETUP       = 0x03
  CONFIG         = 0x0f
  
  This code is under public domain
  
  Last updated on 21/08/28 
  https://dhirajkushwaha.com/elekkrypt
 */

#include <SPI.h>
#include <RF24.h>
#include <printf.h>

RF24 radio(9,10);

byte addresses[][6] = {"1Node", "2Node"};


void setup() {
  radio.begin();
  radio.setPALevel(RF24_PA_LOW);
  
  radio.openWritingPipe(addresses[0]);
  radio.openReadingPipe(1, addresses[1]); 
  radio.startListening();
  
  Serial.begin(115200);
  printf_begin();

  radio.printDetails();
  
}

void loop() {
//  empty

}

and i uploaded it to my setup while the adafruit shield was connected to the arduino using wires and the nrf was connected to the arduino. And i got perfect result. the nrf module is working fine. Which means that my arduino freezes the moment i insert the SDA and SCL pins. that seems to be the real problem. any solutions??

And what 2 pins does the motor shield use for the servo PWM pins?

hmmm, That makes sense, although I plan to move the servo using the dedicated servo pins on the motorshield at the top left f the shield, however in my code I have attached it at pin 10

 flexServo.attach(10);

should i change it?
also, idk how but when tried attaching the motorshield on top of the arduino and uploaded my code the nrf module was WORKING AGAIN. how does this happen i have no clue, and this time i attached all motors and it was working perfectly.... Praise the Omnissiah.

although, should i make amends in the servo pin or is it alright?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.