// to compile as on the diagrams, check that you have changed the SS port as indicated on the README
// before transfert, check that you have changed the SS port as indicated on the README or you will not be able to use the LoRa shield as the same time as the Ethernet shield
#include<SPI.h> // to communicate using spi (required for our shields)
#include<SPI.h> // to communicate using spi (required for our shields)
#include<LoRa.h> // to use the LoRa shield
#include<LoRa.h> // to use the LoRa shield
#include"Ethernet.h" // to use the ethernet shield
#include"Ethernet.h" // to use the ethernet shield
#include"util.h" // to have the display of the elapsed time
#define LENMAX 80 // maximum size for the LoRa frame
#define LENMAX 80 // maximum size for the LoRa frame
#define Serial SerialUSB // serial out on the M0 use a different function
#define Serial SerialUSB // serial out on the M0 use a different function
@ -28,61 +27,61 @@ void setup(){
//Ethernet.begin(mac, ip); // initialize Ethernet shield using the set mac adress and set IP
//Ethernet.begin(mac, ip); // initialize Ethernet shield using the set mac adress and set IP
Ethernet.begin(mac);// initialize Ethernet shield uding the set mac and DHCP for the IP
Ethernet.begin(mac);// initialize Ethernet shield uding the set mac and DHCP for the IP
server.begin();
server.begin();// initialize WebServer part of the librairy
Serial.print("server is at ");
Serial.print("server is at ");// display on serial the IP you can find the webpage
Serial.println(Ethernet.localIP());
Serial.println(Ethernet.localIP());
}
}
voidSerialPrintElapsedTime(booleanespaceFinal=true){// to display the elapsed time