user50298: I can't seem to integrate an nRF module to my nodeMCU.
I just want to verify my code but an error message keeps popping up
Below is the sketch:
#include <SPI_Class.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <ESP8266WiFi.h>
#define PIN_CE D4
#define PIN_CSN D3
RF24 radio(PIN_CE, PIN_CSN);

struct package{
  int id = 1;
  int location = 1;
  char timeStamp = "date/time"
};

typedef struct package Package;
Package data;

public int data1=data.id;
public int data2=data.location;
public char data3=data.timeStamp;

byte  address[][6] = "00001"

const char* ssid = "Jino";
const char* pass = "myinternet";

char server[] = "cdgresearch.000webhostapp.com";

WiFiClient client;

int led = 2;

void setup() {
  Serial.begin(9600);
  WiFi.begin(ssid,pass);
  pinMode(led,OUTPUT);
  digitalWrite(led, HIGH);
  delay(500);
  Serial.println("Connecting to: ");
  Serial.println(ssid);
  Serial.print("Connecting");
  while(WiFi.status() != WL_CONNECTED)
  {

    delay(1000);
    Serial.print(".");
  }

  delay(300);
  digitalWrite(led, LOW);
  Serial.println();
  Serial.println("Successfully connected to the network");
  Serial.print("NodeMCU IP Address: ");
  Serial.println(WiFi.localIP());

  delay(1000);

  radio.begin();
  radio.setChannel(115);
  radio.setPALevel(RF24_PA_LOW);
  radio.openWritingPipe(address[0]);
  delay(1000);
}

void loop() {
  // put your main code here, to run repeatedly:
  delay(9000);
  sendData();
}

void sendData(){
  Serial.println("Sending Data...");
  delay(1000);
  if (client.connect(server, 80)){
    WiFi.printDiag(Serial);
    Serial.println("Connected to server");
    client.print("GET /tag2.php?");
    client.print("incoming=Id ");
    client.print(data1);
    client.print("&incoming2=Loc");
    client.print(data2);
    client.println(" HTTP/1.1");
    client.println("Host: cdgresearch.000webhostapp.com");
    client.println("Connection: close");
    client.println();
    Serial.println();

    while(client.connected()){
      while(client.available()){
        Serial.write(client.read());
       }
      }
    radio.write(&data,sizeof(data));

    Serial.print("\nPackage: ");
    Serial.println(data1);
    Serial.print("Location: ")
    Serial.println(data2)
    Serial.println(data3)
    data1+=1;
    data2+=1;
    delay(1000);

  }

  else{
    Serial.println("Failed to Connect to server...");
    }

  client.stop();
  Serial.println("Disconnected from Server");
  while(client.status()!=0){
    delay (10);
   }
  }

and this error comes up in the console:

even if I use the #include, still this pops out


user47164: I can confirm that it's possible to connect the two with TMRH20's RF24 library, which seems to be what you are using (judging by the name of the library). I'm currently building something with those very two components.
Instead, the error is that SPI_Class.h can't be found by the IDE. I can't recognize the name either, but if that is from attempting to include SPI to interface with the NRF24L01, you'd want SPI.h instead.

user50298: I reinstalled Arduino IDE and the libraries that I need, it works fine now. It must be because someone used my laptop and installed some rfid libraries which caused some problems in the libraries folders. 

user37622: Your error is: .../packages/esp8266/hardware/esp8266/2.4.2/libraries/SPI/src/SPI.h:1:23: fatal error: SPI_Class.h: No such file or directory...
You have some wrong SPI library there. The original folder packages/esp8266/hardware/esp8266/2.4.2/libraries/SPI doesn't contain src subfolder.

50298: <p>I can't seem to integrate an nRF module to my nodeMCU.
I just want to verify my code but an error message keeps popping up</p>

<p>Below is the sketch:</p>

<pre><code>#include &lt;SPI_Class.h&gt;
#include &lt;nRF24L01.h&gt;
#include &lt;RF24.h&gt;
#include &lt;ESP8266WiFi.h&gt;
#define PIN_CE D4
#define PIN_CSN D3
RF24 radio(PIN_CE, PIN_CSN);

struct package{
  int id = 1;
  int location = 1;
  char timeStamp = "date/time"
};

typedef struct package Package;
Package data;

public int data1=data.id;
public int data2=data.location;
public char data3=data.timeStamp;

byte  address[][6] = "00001"

const char* ssid = "Jino";
const char* pass = "myinternet";

char server[] = "cdgresearch.000webhostapp.com";

WiFiClient client;

int led = 2;

void setup() {
  Serial.begin(9600);
  WiFi.begin(ssid,pass);
  pinMode(led,OUTPUT);
  digitalWrite(led, HIGH);
  delay(500);
  Serial.println("Connecting to: ");
  Serial.println(ssid);
  Serial.print("Connecting");
  while(WiFi.status() != WL_CONNECTED)
  {

    delay(1000);
    Serial.print(".");
  }

  delay(300);
  digitalWrite(led, LOW);
  Serial.println();
  Serial.println("Successfully connected to the network");
  Serial.print("NodeMCU IP Address: ");
  Serial.println(WiFi.localIP());

  delay(1000);

  radio.begin();
  radio.setChannel(115);
  radio.setPALevel(RF24_PA_LOW);
  radio.openWritingPipe(address[0]);
  delay(1000);
}

void loop() {
  // put your main code here, to run repeatedly:
  delay(9000);
  sendData();
}

void sendData(){
  Serial.println("Sending Data...");
  delay(1000);
  if (client.connect(server, 80)){
    WiFi.printDiag(Serial);
    Serial.println("Connected to server");
    client.print("GET /tag2.php?");
    client.print("incoming=Id ");
    client.print(data1);
    client.print("&amp;incoming2=Loc");
    client.print(data2);
    client.println(" HTTP/1.1");
    client.println("Host: cdgresearch.000webhostapp.com");
    client.println("Connection: close");
    client.println();
    Serial.println();

    while(client.connected()){
      while(client.available()){
        Serial.write(client.read());
       }
      }
    radio.write(&amp;data,sizeof(data));

    Serial.print("\nPackage: ");
    Serial.println(data1);
    Serial.print("Location: ")
    Serial.println(data2)
    Serial.println(data3)
    data1+=1;
    data2+=1;
    delay(1000);

  }

  else{
    Serial.println("Failed to Connect to server...");
    }

  client.stop();
  Serial.println("Disconnected from Server");
  while(client.status()!=0){
    delay (10);
   }
  }
</code></pre>

<p>and this error comes up in the console:
<a href="https://i.stack.imgur.com/aFdLw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aFdLw.png" alt="enter image description here"></a></p>

<p>even if I use the #include, still this pops out
<a href="https://i.stack.imgur.com/RUCZi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RUCZi.png" alt="enter image description here"></a></p>
 47164: <p>I can confirm that it's possible to connect the two with TMRH20's RF24 library, which seems to be what you are using (judging by the name of the library). I'm currently building something with those very two components.</p>

<p><em>Instead, the error is that <strong>SPI_Class.h</strong> can't be found by the IDE</em>. I can't recognize the name either, but if that is from attempting to include SPI to interface with the NRF24L01, you'd want <strong>SPI.h</strong> instead.</p>
 50298: <p>I reinstalled Arduino IDE and the libraries that I need, it works fine now. It must be because someone used my laptop and installed some rfid libraries which caused some problems in the libraries folders. </p>
 37622: <p>Your error is: .../packages/esp8266/hardware/esp8266/2.4.2/libraries/SPI/<strong>src/SPI.h</strong>:1:23: fatal error: SPI_Class.h: No such file or directory...</p>

<p>You have some wrong SPI library there. The original folder <code>packages/esp8266/hardware/esp8266/2.4.2/libraries/SPI</code> doesn't contain <code>src</code> subfolder.</p>
