my hello world I put the code in and it is not going through in the serial monitor I'm not really sure what is wrong if it is the transmitter or coding can I please get some help.
More details needed.
What is your transmitter?
Which Arduino?
Show your code (and use code tags; see How to use this forum - please read. - Installation & Troubleshooting - Arduino Forum, point #7), else nobody will be able to exclude that.
Does an example like Communication -> ASCIItable work?
here's the code
Library: TMRh20/RF24, GitHub - nRF24/RF24: OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";
void setup() {
radio.begin();
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_MIN);
radio.stopListening();
}
void loop() {
const char text[] = "Hello World";
radio.write(&text, sizeof(text));
delay(1000);
}
the transmitter is an nrf24 by aideepen
I have 2 Arduino mega 2560's
Your code does not print anything on serial monitor so no surprise that you don't see anything.
...and you don't even initialise the serial port.
Please remember to use code tags when posting code.
Have a look at this Simple nRF24L01+ Tutorial.
Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.
The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work
There is also a connection test program to check that the Arduino can talk to the nRF24 it is connected to.
A common problem with nRF24 modules is insufficient 3.3v current from the Arduino 3.3v pin. The high-power nRF24s (with the external antenna) will definitely need an external power supply. At least for testing try powering the nRF24 with a pair of AA alkaline cells (3v) with the battery GND connected to the Arduino GND.
...R