Hi everyone,
I just try to design my circuits with two SPI devices that are Ethernet Shield and Long Range Transreciever
These two modules communicates on SPI bus, now I made first connections for LORA NRF24L01 like this
Pin 9 - CE
Pin 10 - CS(N)
Pin 11 - MOSI
Pin 12 - MISO
Pin 13 - SCK
3.3v - VCC
GND - GND
now for my ethernet library; according to this website , my module is also Pin 10 to SS (Slave Select).
Then I understand that I cannot change SS pin of ethernet module, so should I change the LORA SS pin?
What is the SS pin of LORA module? I want to use like this :
Thanks a lot.
system
February 7, 2018, 2:04pm
2
Then I understand that I cannot change SS pin of ethernet module, so should I change the LORA SS pin?
Yes.
What is the SS pin of LORA module?
You pick an Arduino pin to connect the LORA module to. This might be interesting - http://howtomechatronics.com/tutorials/arduino/arduino-wireless-communication-nrf24l01-tutorial/
Robin2
February 7, 2018, 2:16pm
3
You can use any I/O pin for SS. Each SPI device needs to be controlled by a different SS pin. The nRF24 module also needs a CE pin.
...R
Thanks for your answers, I'll do it
I have a last question, If you have ever used this LORA module, did you use any additional bypass capacitor btw GND & VCC ?
Some people say that If I use it in RF24_PA_MAX I should have to use.
Robin2
February 7, 2018, 5:40pm
5
An nRF24L01+ is NOT a LORA module. They are completely different things.
How are you powering your nRF24? The high-power modules with an external antenna probably need a separate 3.3v power supply.
...R
Simple nRF24L01+ Tutorial
Robin2:
An nRF24L01+ is NOT a LORA module. They are completely different things.
How are you powering your nRF24? The high-power modules with an external antenna probably need a separate 3.3v power supply.
...R
Simple nRF24L01+ Tutorial
In this link he said The nRF24 modules require a 3.3v power supply. Be careful NOT to connect the VCC pin to a 5v power supply. I have found that they work satisfactorily when connected to the 3.3v pin on my Unos.
I'm lucky
Robin2
February 9, 2018, 4:50pm
7
boraciner:
I have found that they work satisfactorily when connected to the 3.3v pin on my Unos.
My low power nRF24L01+ modules (with the PCB antenna) work from the Uno's 3.3v pin. I suspect the high-power version with the external antenna will need more current than the Uno's 3.3v converter can provide. If you overload it it will fail sooner rather than later.
...R
Hi everyone,
I try to first connection btw my NRF24L01+PA+LNA modules but I'm about losing my mind pls help me I checked every single wire over and over again.
Thanks a lot ..
BC
My module :
my connection diagrams :
Server
Client
Server Code :
#include <string.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9, 10); // CE, CSN
const byte address[6] = "00001";
struct {
int temp, hum, air;
char sensorId;
}
dataReceived;
void setup()
{
Serial.begin(9600);
delay(2000);
radio.begin();
radio.openReadingPipe(0, address);
radio.setPALevel(RF24_PA_MAX);
radio.startListening();
}
void loop()
{
if (radio.available())
{
radio.read(&dataReceived, sizeof(dataReceived));
Serial.print("SENSOR ID: ");
Serial.println((int)dataReceived.sensorId);
Serial.print("Temperature: ");
Serial.println(dataReceived.temp);
Serial.print("Humidity: ");
Serial.println(dataReceived.hum);
Serial.print("Air Quality: ");
Serial.println(dataReceived.air);
Serial.println();
}
}
Client Code :
#include "DHT.h"
#include <SPI.h>
#include "RF24.h"
#include "nRF24L01.h"
//Client id must be different for every reporter!
#define CLIENT_ID 1
#define DHTPIN 3
#define DHTTYPE DHT22
const int gasPin = A0;
DHT dht(DHTPIN, DHTTYPE);
RF24 radio(9,10);
const byte address[6] = "00001";
struct {
int temp, hum, air;
char sensorId;
}
data;
float h,t;
int q;
void setup()
{
Serial.begin(9600);
dht.begin();
delay(1000);
h = dht.readHumidity();
t = dht.readTemperature();
radio.begin();
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_MAX);
radio.stopListening();
}
void loop()
{
DelayMinute(2);
SendData();
}
void DelayMinute(int mins)
{
for(int y = 0 ; y < mins ; y++)
{
for (int i = 0 ; i < 60; i++)
{
delay(1000);
}
}
}
void Measure()
{
/*h = dht.readHumidity();
t = dht.readTemperature();
while (isnan(h) || isnan(t)){
h = dht.readHumidity();
t = dht.readTemperature();
}
q = analogRead(gasPin);*/
h=50;t=51;q=52;
data.temp = (int) t;
data.air = (int)q;
data.hum = (int) h;
}
void SendData()
{
Measure();
data.sensorId = CLIENT_ID;
radio.powerUp();
radio.write(&data,sizeof(data));
radio.powerDown();
}
Your Server code
RF24 radio(9, 10); // CE, CSN
doesn't agree with the wiring you show.
Robin2
February 10, 2018, 9:44pm
11
Don't Double Post. I have suggested to the Moderator to merge this with your other Thread where you have already been receiving advice.
...R