I'm new to this so apologies in advance for any forum customs not followed.
My project consists of 2 systems
Controller: Arduino Mega, Adafruit microSD card module (SPI) and Grove BLE (dual model) (Serial)
Slave: Arduino Nano, battery, Adafruit microSD card module (SPI), Grove BLE (dual model) (Serial) and Makerhawk MPU9250 (I2C).
Idea: The Controller sends commands over Bluetooth to the Slave to record acceleration data and send it back over Bluetooth. Also have a "check connection status" command and a delete data command.
Problem: My Nano appears not to want to talk to my BLE module. The Nano is either not receiving the commands, or not acting on them. The BLE is definitely on and connected, the LED on the module is not flashing it is on, which is how the module indicates it is connected to another Bluetooth device.
What I've tried:
I got this working with a Mega instead of the Nano. I did this so I could connect to both PC Serial monitor over USB for debugging, and to the BLE using Serial1.
I have also had it working with no BLE, with commands issued from Serial monitor to Nano.
Both worked exactly as wanted. When I sent the corresponding commands, it would run the check connection status function, start recording data, stop recording data, send the data across to the Controller, delete the data from the microSD card.
I tried with no USB attached to Nano, powered by 9V battery. When I sent commands from the Controller, the Nano did not receive them/act on them.
I tried using the SoftwareSerial library to connect to the BLE with digital pins 6 and 7 as RX and TX, and the Nano did not receive/act on the commands.
I tried both a proper Arduino Nano, and a clone. No difference with either.
I tried both RX-TX TX-RX and RX-RX TX-TX connections between BLE and Nano in case it was mislabeled. This was pure desperation, when completely out of ideas apart from headbutting a wall.
Because I had it working on the Mega with the same external modules, I think the problem is my Nano. Another thing pointing me towards the Nano is how the IDE does not recognise it when plugged in to a laptop. (I tried 2 different laptops, up to date drivers etc.) and I can only upload code to it/communicate through serial monitor when compiled for an Uno, which was a workaround I saw in a couple of forums. It seems many people have problems with Nano Serial... just in a slightly different form to my current one. Has anyone had similar issues?
Code in replies because max post length and I wanted to get all the info in.