No radio signal with using ETHERNET Shield
-
I wanna build a sensor network that includes just two node. One node transmits sensor values, the other one is load the values to internet. Without ethernet shield, nodes communicated each other. Then, with ethernet shield, i used mysensor library, softspi etc. i didn't get anything. I thought, maybe my ethernet shield was broken, but it is working fine without NRF24L01. i wanted to look radio signals using softspi with ethernet but it didn't upload internet( because i can't do it.). I tried codes to get sensor values. But only i see "no signal available". So, i don't understand anything about softspi, using nrf24l01 with ethernetshield. my nrf24l01 connections are =
A2 MISO
A1 MOSI
A0 SCK
6 CSN
5 CE------------my transmitter code is;------------------------
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
/-----( Declare Constants and Pin Numbers )-----/
#define CE_PIN 9
#define CSN_PIN 10// NOTE: the "LL" at the end of the constant is "LongLong" type
const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe/-----( Declare objects )-----/
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
/-----( Declare Variables )-----/
int signal[2]; // 2 element array holding Joystick readingsvoid setup() /****** SETUP: RUNS ONCE ******/
{
Serial.begin(9600);
radio.begin();
radio.openWritingPipe(pipe);
}//--(end setup )---void loop()
{
signal[0] = 1;
signal[1] = 0;radio.write( signal, sizeof(signal) );
}
//( THE END )**
-----------------------my receiver code;------------------------------------
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <DigitalIO.h>
#include <DigitalPin.h>
#include <I2cConstants.h>
#include <nRF24L01.h>
#include <PinIO.h>#include <RF24_config.h>
#include <SoftI2cMaster.h>
#include <SoftSPI.h>/-----( Declare Constants and Pin Numbers )-----/
#define CE_PIN 5
#define CSN_PIN 6// NOTE: the "LL" at the end of the constant is "LongLong" type
const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe/-----( Declare objects )-----/
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
/-----( Declare Variables )-----/
int joystick[2]; // 2 element array holding Joystick readingsvoid setup() /****** SETUP: RUNS ONCE ******/
{
Serial.begin(9600);
delay(1000);
Serial.println("Nrf24L01 Receiver Starting");
radio.begin();
radio.openReadingPipe(1,pipe);
radio.startListening();;
}//--(end setup )---void loop()
{
if ( radio.available() )
{
// Read the data payload until we've received everything
bool done = false;
while (!done)
{
// Fetch the data payload
done = radio.read( signal, sizeof(signal) );
Serial.print("X = ");
Serial.print(signal[0]);
Serial.print(" Y = ");
Serial.println(signal[1]);}
}
else
{
Serial.println("No radio available");
}}
//( THE END )**
What am i doing wrong? what i am missing? i get X=-1, Y=-1 WHY?? can anyone help me?
-
I wanna build a sensor network that includes just two node. One node transmits sensor values, the other one is load the values to internet. Without ethernet shield, nodes communicated each other. Then, with ethernet shield, i used mysensor library, softspi etc. i didn't get anything. I thought, maybe my ethernet shield was broken, but it is working fine without NRF24L01. i wanted to look radio signals using softspi with ethernet but it didn't upload internet( because i can't do it.). I tried codes to get sensor values. But only i see "no signal available". So, i don't understand anything about softspi, using nrf24l01 with ethernetshield. my nrf24l01 connections are =
A2 MISO
A1 MOSI
A0 SCK
6 CSN
5 CE------------my transmitter code is;------------------------
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
/-----( Declare Constants and Pin Numbers )-----/
#define CE_PIN 9
#define CSN_PIN 10// NOTE: the "LL" at the end of the constant is "LongLong" type
const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe/-----( Declare objects )-----/
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
/-----( Declare Variables )-----/
int signal[2]; // 2 element array holding Joystick readingsvoid setup() /****** SETUP: RUNS ONCE ******/
{
Serial.begin(9600);
radio.begin();
radio.openWritingPipe(pipe);
}//--(end setup )---void loop()
{
signal[0] = 1;
signal[1] = 0;radio.write( signal, sizeof(signal) );
}
//( THE END )**
-----------------------my receiver code;------------------------------------
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <DigitalIO.h>
#include <DigitalPin.h>
#include <I2cConstants.h>
#include <nRF24L01.h>
#include <PinIO.h>#include <RF24_config.h>
#include <SoftI2cMaster.h>
#include <SoftSPI.h>/-----( Declare Constants and Pin Numbers )-----/
#define CE_PIN 5
#define CSN_PIN 6// NOTE: the "LL" at the end of the constant is "LongLong" type
const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe/-----( Declare objects )-----/
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
/-----( Declare Variables )-----/
int joystick[2]; // 2 element array holding Joystick readingsvoid setup() /****** SETUP: RUNS ONCE ******/
{
Serial.begin(9600);
delay(1000);
Serial.println("Nrf24L01 Receiver Starting");
radio.begin();
radio.openReadingPipe(1,pipe);
radio.startListening();;
}//--(end setup )---void loop()
{
if ( radio.available() )
{
// Read the data payload until we've received everything
bool done = false;
while (!done)
{
// Fetch the data payload
done = radio.read( signal, sizeof(signal) );
Serial.print("X = ");
Serial.print(signal[0]);
Serial.print(" Y = ");
Serial.println(signal[1]);}
}
else
{
Serial.println("No radio available");
}}
//( THE END )**
What am i doing wrong? what i am missing? i get X=-1, Y=-1 WHY?? can anyone help me?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login