Arduino NANO: nrf24l01 & ENC28J60 ethernet shield conflicts

Hi,

I am experimenting with the NANO and the ENC28J60 ethernet shield.

I had a first ‘project’ with two nano’s and NRF24I01’s: This worked perfectly I send a 1 or 0 and I received it :slight_smile:

A second ‘project’ was just one nano and the ENC28J60 ethernet shield for a small website… I typed 192.168.1.25 in my browser and it says: HELLO WORLD!! so this is working two…

Now I want to combine the two: When I receive a 1 or 0 on the NRF24I01, It must be printed on the website… but this doesn’t work :frowning: It still can connect to the HELLO WORLD site, but it seems that I don’t receive anything from the NRF24I01…

What’s wrong? Here’s my code of te receiver (the transmitter isn’t included because I’m sure this is working)

#include <nRF24L01.h>
#include <RF24.h>
#include <RF24_config.h>
#include <SPI.h>
#include <SoftSPI.h>
#include "etherShield.h"
#include "ETHER_28J60.h"


// Define MAC address and IP address - both should be unique in your network
static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24};  
static uint8_t ip[4] = {192, 168, 1, 25}; 
static uint16_t port = 80; // Use port 80 - the standard for HTTP                                     

ETHER_28J60 ethernet;
 
int msg[1];
RF24 radio(6,7);
const uint64_t pipe = 0xE8E8F0F0E1LL;

void setup(void){    
  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(1,pipe);
  radio.setChannel(70);
  radio.startListening();
  ethernet.setup(mac, ip, port);
}
void loop(void){
 if (radio.available()){
  
    bool done = false;  
      
    while (!done){
      done = radio.read(msg, 2); 
      if (msg[0] == 1){
       Serial.print("> Receiving: 1");
        }    
      else if (msg[0] == 0) {
       Serial.print("> Receiving: 0");
       Serial.println("RESET"); 
        }else if (msg[0] >= 2) {
       Serial.print(msg[0]); 
        }
     }
    }
   

  if (ethernet.serviceRequest())
  {
    ethernet.print("<H1>Hello World</H1>");
    ethernet.respond();
  }
  delay(100);
}