It looks right why am i getting nothing nrf24lo1

i am new to this i learn quick but i need someone with a little more experences to look over my codes and clean it up

NRF24lo1 , stepper , easydriver , pot , nano

/*

  • Arduino Wireless Communication Tutorial
  • Transmitter Code, Stepper Control with Potentiometer
  • by Jason Bickford
  • Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
    */
    #include <SPI.h>
    #include <nRF24L01.h>
    #include <RF24.h>
    #include “AccelStepper.h”

RF24 radio(7, 8); // CE, CSN
const byte addresses[6] = {“00001”, “00002”};
// Variables to store current, previous and move position
int val = 0;
int previous = 0;
int long newval = 0;
void setup() {

radio.begin();
radio.openWritingPipe(addresses[1]); // 00001
radio.openReadingPipe(1, addresses[0]); // 00002
radio.setPALevel(RF24_PA_MIN);
}
void loop() {
delay(5);
radio.stopListening();
int potValue = analogRead(A0); // Read Potentiometer current value

radio.write(&val, sizeof (val));
delay(5);
radio.startListening();
while (!radio.available());{

}
}

/*

  • Arduino Wireless Communication ,stepper,easydriver, pot,nrf24lo1
  • Receiver Code
  • by Jason Bickford
  • Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
    */
    #include <SPI.h>
    #include <nRF24L01.h>
    #include <RF24.h>
    #include “AccelStepper.h”
    // AccelStepper Setup
    AccelStepper stepper(1, 2, 3); // 1 = Easy Driver interface
    // Nano Pin 2 connected to STEP pin of Easy Driver
    // Nano Pin 3 connected to DIR pin of Easy Driver
    RF24 radio(7, 8); // CE, CSN
    const byte addresses[6] = {“00001”, “00002”};

// Variables to store current, previous and move position
int val = 0;
int previous = 0;
int long newval = 0;

void setup() {

radio.begin();
radio.openWritingPipe(addresses[0]); // 00002
radio.openReadingPipe(1, addresses[1]); // 00001
radio.setPALevel(RF24_PA_MIN);
stepper.setMaxSpeed(4800); // Set speed fast enough to follow pot rotation
stepper.setAcceleration(4800); // High Acceleration to follow pot rotation

}
void loop() {
delay(5);
radio.startListening();
if ( radio.available()) {
while (radio.available()) {
int potvalue = 0;
radio.read(&val,sizeof(potvalue));
Read Potentiometer current value
if ((val > previous+6) || (val < previous-6)) { // Check that a move of the pot is at least > or < than 6
newval = map(val, 0, 1023, 0, 800); // Map value (1600 = 1 stepper shaft rotation)
stepper.runToNewPosition(newval); // Move stepper to new position
previous = val; // save current value into variable previous
AccelStepper .write(newval,sizeof (newval));
}
delay(5);
radio.stopListening();

radio.write(&buttonState, sizeof(buttonState));
}
}

i am new to this i learn quick

So learn how to use this forum by reading the sticky post at the top. It will tell you how to post code so there are no emoticons in it.

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

When posting code please use the code button </>
codeButton.png

so your code looks like this

and is easy to copy to a text editor See How to use the Forum

...R

``/*

  • Arduino Wireless Communication Tutorial
  • Transmitter Code, Stepper Control with Potentiometer
  • by Jason Bickford
  • Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
    */
    #include <SPI.h>
    #include <nRF24L01.h>
    #include <RF24.h>
    #include “AccelStepper.h”

RF24 radio(7, 8); // CE, CSN
const byte addresses[6] = {“00001”, “00002”};
// Variables to store current, previous and move position
int val = 0;
int previous = 0;
int long newval = 0;
void setup() {

radio.begin();
radio.openWritingPipe(addresses[1]); // 00001
radio.openReadingPipe(1, addresses[0]); // 00002
radio.setPALevel(RF24_PA_MIN);
}
void loop() {
delay(5);
radio.stopListening();
int potValue = analogRead(A0); // Read Potentiometer current value

radio.write(&val, sizeof (val));
delay(5);
radio.startListening();
while (!radio.available());{

}
}

/*use a pot to turn a stepper motor wireless

  • Arduino Wireless Communication ,stepper,easydriver, pot,nrf24lo1
  • Receiver Code
  • by Jason Bickford
  • Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
    */
    #include <SPI.h>
    #include <nRF24L01.h>
    #include <RF24.h>
    #include “AccelStepper.h”
    // AccelStepper Setup
    AccelStepper stepper(1, 2, 3); // 1 = Easy Driver interface
    // Nano Pin 2 connected to STEP pin of Easy Driver
    // Nano Pin 3 connected to DIR pin of Easy Driver
    RF24 radio(7, 8); // CE, CSN
    const byte addresses[6] = {“00001”, “00002”};

// Variables to store current, previous and move position
int val = 0;
int previous = 0;
int long newval = 0;

void setup() {

radio.begin();
radio.openWritingPipe(addresses[0]); // 00002
radio.openReadingPipe(1, addresses[1]); // 00001
radio.setPALevel(RF24_PA_MIN);
stepper.setMaxSpeed(4800); // Set speed fast enough to follow pot rotation
stepper.setAcceleration(4800); // High Acceleration to follow pot rotation

}
void loop() {
delay(5);
radio.startListening();
if ( radio.available()) {
while (radio.available()) {
int potvalue = 0;
radio.read(&val,sizeof(potvalue));

if ((val > previous+6) || (val < previous-6)) { // Check that a move of the pot is at least > or < than 6
newval = map(val, 0, 1023, 0, 1600); // Map value (1600 = 1 stepper shaft rotation)
stepper.runToNewPosition(newval); // Move stepper to new position
previous = val; // save current value into variable previous

}
delay(5);
radio.stopListening();
Serial.print( newval );
}
}

i can not get any communication between nrf24lo1’s is it my code are is it my nrf24lo1’s

Fail try again.
If you can't post code correctly when given the instructions how are you going to manage when it comes to understanding the code or the advice we can give you?

Go back and re-read post #2. Get the hardware working with known and proven software. Use the code with zero changes and wire things exactly per the tutorial. If that does not work, post photos of your boards, modules and wiring.

You’re not going to get very far by ignoring the responses from the same people you're asking for help.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile: