Im looking to connect my adafruit feather M0 to a nrf24lo1+ RF module and I cant seem to send a message. I succeeded to connect the module to Arduino but Ive had no luck with the feather M0. I think my issue lies somewhere in the code for which im no expert at. If someone has succeeded this before I could really use the help thanks.
I suggest that you post your code and a schematic of your project
//Include Libraries
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
//create an RF24 object
RF24 radio(11, 10); // CE, CSN
//address through which two modules communicate.
const byte address[6] = "00001";
void setup()
{
radio.begin();
//set the address
radio.openWritingPipe(address);
//Set module as transmitter
radio.stopListening();
}
void loop()
{
//Send message to receiver
const char text[] = "Hello World";
radio.write(&text, sizeof(text));
delay(1000);
}
This is just a simple test to make sure it works. For my connections, gnd to gnd, vcc to 3v ce to 11, csn to 10, scxk to sck, miso to miso and mosi to mosi.
SIGH .........
How did I know that you would post your code without using code tags ?
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination
https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum
This is the easiest way to tidy up the code and add the code tags
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.