i have a compilation problem with my arduino une and mega and i don't know why

#include <SPI.h> // Pour la communication via le port SPI
#include <Mirf.h> // Pour la gestion de la communication
#include <nRF24L01.h> // Pour les définitions des registres du nRF24L01
#include <MirfHardwareSpiDriver.h> // Pour la communication SPI

void setup() {
Serial.begin(9600);

Mirf.cePin = 9; // Broche CE sur D9
Mirf.csnPin = 10; // Broche CSN sur D10
Mirf.spi = &MirfHardwareSpi; // On veut utiliser le port SPI hardware
Mirf.init(); // Initialise la bibliothèque

Mirf.channel = 1; // Choix du canal de communication (128 canaux disponibles, de 0 à 127)
Mirf.payload = sizeof(long); // Taille d’un message (maximum 32 octets)
Mirf.config(); // Sauvegarde la configuration dans le module radio

Mirf.setTADDR((byte *) “nrf01”); // Adresse de transmission
Mirf.setRADDR((byte *) “nrf02”); // Adresse de réception

Serial.println(“Go !”);
}

void loop() {
byte message[sizeof(long)];

if(!Mirf.isSending() && Mirf.dataReady()){
Serial.println(“Ping !”);
Mirf.getData(message); // Réception du paquet
Mirf.send(message); // Et on le renvoie tel quel
}
}

Please post the compiler error message.

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

Also use the code button for the error message.

...R

#include <SPI.h>      // Pour la communication via le port SPI
#include <Mirf.h>     // Pour la gestion de la communication
#include <nRF24L01.h> // Pour les définitions des registres du nRF24L01
#include <MirfHardwareSpiDriver.h> // Pour la communication SPI

void setup() {
  Serial.begin(9600);

  Mirf.cePin = 9; // Broche CE sur D9
  Mirf.csnPin = 10; // Broche CSN sur D10
  Mirf.spi = &MirfHardwareSpi; // On veut utiliser le port SPI hardware
  Mirf.init(); // Initialise la bibliothèque

  Mirf.channel = 1; // Choix du canal de communication (128 canaux disponibles, de 0 à 127)
  Mirf.payload = sizeof(long); // Taille d'un message (maximum 32 octets)
  Mirf.config(); // Sauvegarde la configuration dans le module radio

  Mirf.setTADDR((byte *) "nrf01"); // Adresse de transmission
  Mirf.setRADDR((byte *) "nrf02"); // Adresse de réception

  Serial.println("Go !"); 
}

void loop() {
  byte message[sizeof(long)];

  if(!Mirf.isSending() && Mirf.dataReady()){
    Serial.println("Ping !");
    Mirf.getData(message); // Réception du paquet
    Mirf.send(message); // Et on le renvoie tel quel
  }
}

error message:
Erreur de compilation pour la carte Arduino/Genuino Uno

We need the complete error output. The generic message you provided doesn’t help us at all.

When you encounter an error you’ll see a button on the right side of the orange bar “Copy error messages” (or the icon that looks like two pieces of paper in the Arduino Web Editor). Click that button. Paste the error in a message here USING CODE TAGS (</> button on the forum toolbar). If the text exceeds the forum’s 9000 character limit, save it to a text file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link.

okay i understand, error message is:

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\leo.solelhac\Desktop\sketch_mar05a\sketch_mar05a.ino:2:61: fatal error: Mirf.h: No such file or directory

 #include <Mirf.h>     // Pour la gestion de la communication

                                                             ^

compilation terminated.

Multiple libraries were found for "SPI.h"
 Used: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
 Not used: C:\Program Files (x86)\Arduino\libraries\SPI-master
exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

When you see a "No such file or directory" error it almost always means you need to install the library that contains the missing file.

Often the code you're compiling will come with documentation (either a comment or separate document) that tells you where to get the library dependencies.

In other cases the author of the code will not have been so kind and you'll need to go on a hunt for the missing library.

A good place to start is the Arduino IDE's Library Manager:

  • Sketch > Include Library > Manage Libraries...
  • In the "Filter your search..." box, type some keywords you have gleaned from the missing file name.
  • Scroll through the results for the right library. Click on it.
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close".
  • Try compiling your code again.

If you have no luck in Library Manager then load up your favorite search engine and do a search for the missing filename. You will often get multiple results. If you have a lot of results you might add "arduino" as an additional search keyword. I will usually prefer results on github.com since that is where most Arduino libraries are hosted and downloading from there is fast and easy. In some cases there will be multiple libraries that contain the given filename and you'll need to do some evaluation to determine which seems the most appropriate, then try it out. After downloading the library you found you'll need to install it. This requires a different process than the Library Manager installation. You will find instructions here:

thanks i go to try this