Wifi shield to ethernet shield

Hello
I need to make a panel that controls a electronic scoreboard. The electronic scoreboard works with a ethernet shield. you can use a site that runs on a Arduino to control the numbers on it. But I need to make a separate panel that controls the scoreboard with buttons. The panel has a wifi shield ( SparkFun WiFi Shield - ESP8266) and needs to control the scoreboard.
So my question is: Whats the best way to do it ?.

Hello,
You could analyse the software of the scoreboard and replace the code for the web page with code that receives UDP messages from any source and translates this to control of the board. Then you make sure your button panel sends a UDP message over the WiFi to the scoreboard once a button is pressed.
The code examples for the Ethernet and the WiFi lib on the Arduino site should be sufficient to get you going.

Best Regards,
Johi.

If you intend to replace Ethernet with ESP8266, you probably don’t need an Arduino.

Wont the web page then disappear? It still needs a functioning webpage and a panel.

Probably not.
You don’t mention what Arduino you intend to use but, if WiFi is in the game, it seems that about the only reason for not using an ESP device instead is that it doesn’t have enough i/o, which probably means you are using a Mega.

Note that ESP8266 are strictly 3.3v for peripherals, which is not likely to be a problem for you.

You might start here:
https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html

And even then, there are I2C and SPI I/O Expanders.

The arduino on the scoreboard indeed has a Arduino mega. the panel has a Arduino uno.

this is the code of the scoreboard.

`#include <Dhcp.h>
#include <Dns.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <EthernetServer.h>
#include <EthernetUdp.h>
#include <Twitter.h>
#include <util.h>

#include <SPI.h>
#include <Ethernet.h>

#include <Servo.h> 


// bibliotheek voor clock
#include <SimpleTimer.h>


/* -----------------------------------------------------------------
 *      Variabelen en objecten
 *-----------------------------------------------------------------*/

// klok 
SimpleTimer timer;
int KLOK_TM = 0;        // tientallen minuten
int KLOK_EM = 0;        // eenheden minuten
int KLOK_TS = 0;        // tientallen seconden
int KLOK_ES = 0;        // eenheden seconden
String klokString = "00 : 00";
int timerState = 0;                // 0 = pause, 1 = run
String clockType = "countUp";      // countUp or countDown


// score
int SCORE_ET = 0;
int SCORE_TT = 0;
int SCORE_EB = 0;
int SCORE_TB = 0;


// HELFT
int HELFT = 0;

// webserver
Servo microservo; 
int pos = 0; 
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };   //physical mac address
byte ip[] = { 192, 168, 1, 9};                      // ip in lan (that's what you need to use in your browser. ("192.168.1.178")
//byte ip[] = { 192, 168, 0, 110 };                      // ip in lan (that's what you need to use in your browser. ("192.168.1.178")
byte gateway[] = { 192, 168, 1, 1 };                    // internet access via router
byte subnet[] = { 255, 255, 255, 0 };                  //subnet mask
EthernetServer server(80);                             //server port     
String readString;

// test
int counter = 0;



/* -----------------------------------------------------------------
 *      DECLARATIE aansluitpins
 *-----------------------------------------------------------------*/

// SHIFT REGISTERS
// common clockpin
int CLOCK = 12;

// SCORE
// thuisploeg tientallen
int SCORE_TT_LATCH  = 15;    
int SCORE_TT_DATA   = 14; 
// thuisploeg eenheden
int SCORE_TE_LATCH  = 17;    
int SCORE_TE_DATA   = 16;
// bezoekers eenheden
int SCORE_BT_LATCH  = 25;    
int SCORE_BT_DATA   = 23;
// bezoekers eenheden
int SCORE_BE_LATCH  = 29;    
int SCORE_BE_DATA   = 27;

// KLOK        
// tientallen minuten
int KLOK_TM_LATCH   = 26;
int KLOK_TM_DATA    = 28;
// eenheden minuten
int KLOK_EM_LATCH   = 22; 
int KLOK_EM_DATA    = 24; 
// tientallen seconden       
int KLOK_TS_LATCH   = 19; 
int KLOK_TS_DATA    = 18; 
// eenheden seconden       
int KLOK_ES_LATCH  = 21;
int KLOK_ES_DATA   = 20;


// HELFT
int HELFT_LATCH   = 33;
int HELFT_DATA    = 31;
int HELFT_CLOCK   = 35;

/* -----------------------------------------------------------------
 *      Shiftregister-code voor 7-segment display
 *-----------------------------------------------------------------*/

/*
int SHIFT_CODE_DEC_0 = 126;
int SHIFT_CODE_DEC_1 = 48;
int SHIFT_CODE_DEC_2 = 109;
int SHIFT_CODE_DEC_3 = 121;
int SHIFT_CODE_DEC_4 = 51;
int SHIFT_CODE_DEC_5 = 91;
int SHIFT_CODE_DEC_6 = 95;
int SHIFT_CODE_DEC_7 = 112;
int SHIFT_CODE_DEC_8 = 127;
int SHIFT_CODE_DEC_9 = 123;
*/

// DECODERING 7segment --> ShiftRegister
int SHIFT_CODE_DEC_0 = 126;
int SHIFT_CODE_DEC_1 = 12;
int SHIFT_CODE_DEC_2 = 182;
int SHIFT_CODE_DEC_3 = 158;
int SHIFT_CODE_DEC_4 = 204;
int SHIFT_CODE_DEC_5 = 218;
int SHIFT_CODE_DEC_6 = 250;
int SHIFT_CODE_DEC_7 = 14;
int SHIFT_CODE_DEC_8 = 254;
int SHIFT_CODE_DEC_9 = 222;

// DECODERING extra aansluitingen --> ShiftRegister

// Functie aanduiding helften
int SHIFT_CODE_HELFT;
int SHIFT_CODE_HELFT_1 = 2; 
int SHIFT_CODE_HELFT_2 = 4;
int SHIFT_CODE_HELFT_3 = 8;
int SHIFT_CODE_HELFT_0 = 14;  // alle aanduidingen lichten op

/* -----------------------------------------------------------------
 *      Opstart Arduino
 *-----------------------------------------------------------------*/
 
void setup() {
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
    
    SHIFT_CODE_HELFT = SHIFT_CODE_HELFT_0;
  }
  
  microservo.attach(7);
  
  // setup ethernet + server
  Ethernet.begin(mac, ip, gateway, subnet);
  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
  
  // setup klok
  Serial.begin(9600);
  timer.setInterval(1000, ClockCount);
}


void loop() {
  
  // start klok
  timer.run();    
  
  // Create a client connection
  EthernetClient client = server.available();
  if (client) {
    while (client.connected()) {   
      if (client.available()) {
        char c = client.read();
     
        //read char by char HTTP request
        if (readString.length() < 100) {
          //store characters to string
          readString += c;
          //Serial.print(c);
         }

         //if HTTP request has ended
         if (c == '\n') {          
           Serial.println(readString); //print to serial monitor for debuging

//=========================== Actie buttons ===============================================

           // SCORE THUIS +
           if (readString.indexOf("?buttonScoreThuisPlus") >0){      
               ScoreThuisCountPlus();
           }
              
           // SCORE THUIS -
           if (readString.indexOf("?buttonScoreThuisMin") >0){     
               ScoreThuisCountMin();
           }
           
           // SCORE BEZOEK +
           if (readString.indexOf("?buttonScoreBezoekPlus") >0){      
               ScoreBezoekCountPlus();
           }
              
           // SCORE BEZOEK -
           if (readString.indexOf("?buttonScoreBezoekMin") >0){     
               ScoreBezoekCountMin();
           }             
            
           // TIMER START
           if (readString.indexOf("?buttonTimerStart") >0){          
             timerState = 1;
             clockType = "countUp";
           }

           // TIMER PAUZE
           if (readString.indexOf("?buttonTimerPauze") >0){
             timerState = 0;
           } 
           
           // TIMER TEL AF
           if (readString.indexOf("?buttonTimerTelAf") >0){
             timerState = 1;
             clockType = "countDown";
           } 
           
           // TIMER +5min
           if (readString.indexOf("?buttonTimerMinutenPlusVijf") >0){     
               AddFiveMinutes();
           }
           
           // TIMER +1min
           if (readString.indexOf("?buttonTimerMinutenPlusEen") >0){
             AddOneMinute();
           } 
           
           // TIMER RESET
           if (readString.indexOf("?buttonTimerReset") >0){     
               timerReset();
           }
           
           
           // HELFT +
           if (readString.indexOf("?buttonHelftPlus") >0){     
               helftPlus();
           }
//===========================================================================================

           if (readString.indexOf("?button1off") >0){
               counter--;
               ScoreThuisCountMin();
           }
           if (readString.indexOf("?button2on") >0){
                for(pos = 0; pos < 180; pos += 3)  // goes from 0 degrees to 180 degrees 
                {                                  // in steps of 1 degree 
                  microservo.write(pos);              // tell servo to go to position in variable 'pos' 
                  delay(15);                       // waits 15ms for the servo to reach the position 
                } 
           }
           if (readString.indexOf("?button2off") >0){
                for(pos = 180; pos>=1; pos-=3)     // goes from 180 degrees to 0 degrees 
                {                                
                  microservo.write(pos);              // tell servo to go to position in variable 'pos' 
                  delay(15);                       // waits 15ms for the servo to reach the position 
                } 
           }

           Serial.println(counter);

           //decodeer info en plaats op register
           //ShiftRegister(CLOCK, SCORE_TT_LATCH, SCORE_TT_DATA, RegisterDecoder(counter));

           
            //clearing string for next read
            readString="";
            
           client.println("HTTP/1.1 200 OK"); //send new page
           client.println("Content-Type: text/html");
           client.println();     
           client.println("<HTML>");
           client.println("<HEAD>");
           client.println("<meta name='apple-mobile-web-app-capable' content='yes' />");
           client.println("<meta name='apple-mobile-web-app-status-bar-style' content='black-translucent' />");
           client.println("<link rel='stylesheet' type='text/css' href='http://randomnerdtutorials.com/ethernetcss.css' />");
           client.println("<TITLE>Scorebord Gitok</TITLE>");
           client.println("</HEAD>");
           client.println("<BODY>");
           client.println("<H1>   Scorebord Gitok</H1>");
           client.println("<hr>");
           
           client.println("<H1>THUIS      :");
           client.println(SCORE_TT);
           client.println(SCORE_ET); 
           client.println("<br><br>");    
           client.println("<a href=\"/?buttonScoreThuisPlus\"\">__+1__</a>");
           client.println("<a href=\"/?buttonScoreThuisMin\"\">__-1__</a>");
           client.println("<br>");
           client.println("<br>");
           client.println("</H1>");
           
           client.println("<H1>BEZOEK      :");
           client.println(SCORE_TB);
           client.println(SCORE_EB); 
           client.println("<br><br>");    
           client.println("<a href=\"/?buttonScoreBezoekPlus\"\">__+1__</a>");          
           client.println("<a href=\"/?buttonScoreBezoekMin\"\">__-1__</a>");           
           client.println("<br>");
           client.println("<br>");
           client.println("<hr>");
           client.println("</H1>");
                  
           client.println("<H1>TIMER      :");
           client.println("<br><br>");    
           client.println("<a href=\"/?buttonTimerStart\"\">START</a>");
           client.println("<a href=\"/?buttonTimerPauze\"\">PAUZE</a>");
           client.println("<a href=\"/?buttonTimerTelAf\"\">TEL AF</a>");           
           client.println("<br><br>"); 
           client.println("<a href=\"/?buttonTimerReset\"\">RESET</a>");
           client.println("<a href=\"/?buttonTimerMinutenPlusVijf\"\">+5 min</a>");           
           client.println("<a href=\"/?buttonTimerMinutenPlusEen\"\">+1 min</a>");
           client.println("<hr>");
           client.println("</H1>");
           
           client.println("<H1>HELFT      :");
           client.println(HELFT);
           client.println("<br><br>");    
           client.println("<a href=\"/?buttonHelftPlus\"\">__+1__</a>");
           client.println("<hr>");
           client.println("</H1>");
           
           client.println("</BODY>");
           client.println("</HTML>");
     
           delay(1);
           //stopping client
           client.stop();       
         }
       }
    }
}
    
  delay(300);
}

/* -----------------------------------------------------------------
 *      Methode voor aansturing van shiftregister
 *-----------------------------------------------------------------*/
 
void ShiftRegister(int CLOCK, int LATCH, int DATA, int CODE)
{
    pinMode(LATCH, OUTPUT);
    pinMode(CLOCK, OUTPUT);
    pinMode(DATA, OUTPUT);

    // take the latchPin low
    digitalWrite(LATCH, LOW);
    // shift out the bits:
    shiftOut(DATA, CLOCK, MSBFIRST, CODE);
    //take the latch pin high so the LEDs update:
    digitalWrite(LATCH, HIGH);
}

/* -----------------------------------------------------------------
 *      Klokfunctie voor bijhouden van tijdsduur op het scorebord
 *-----------------------------------------------------------------*/
void ClockCount() {
 
  //========= Tellen tijdsduur =========================== 
  if(timerState ==1)
  {
    if(clockType == "countUp")
    { 
      if(KLOK_ES < 9)
      {
        KLOK_ES++;
      }
      else
      {
        if(KLOK_TS < 5)
        {
          KLOK_TS++;
          KLOK_ES = 0;
        }
        else
        {
          KLOK_TS = 0;
          KLOK_ES = 0;
  
          if(KLOK_EM < 9)
          {
            KLOK_EM++;
          }
          else
          {
            if(KLOK_TM < 9)
            {
              KLOK_TM++;
              KLOK_EM = 0; 
            }
            else
            {
              KLOK_TM = 0;
              KLOK_EM = 0;  
            }
          }
        }
      }
    }
    else
    {
      if(KLOK_ES > 0)
      {
        KLOK_ES--;
      }
      else
      {
        if(KLOK_TS > 0)
        {
          KLOK_TS--;
          KLOK_ES = 9;
        }
        else
        {
          KLOK_TS = 5;
          KLOK_ES = 9;
  
          if(KLOK_EM > 0)
          {
            KLOK_EM--;
          }
          else
          {
            if(KLOK_TM > 0)
            {
              KLOK_TM--;
              KLOK_EM = 9; 
            }
            else
            {
              KLOK_TM = 9;
              KLOK_EM = 9;  
            }
          }
        }
      }
    }
  }
  
    
  Serial.print(KLOK_TM);
  Serial.print(KLOK_EM);
  Serial.print(" : ");
  Serial.print(KLOK_TS);
  Serial.print(KLOK_ES);
  Serial.println();

  //klokString = KLOK_TM + KLOK_EM + " : " + KLOK_TS + KLOK_ES;
  /*ShiftRegister(CLOCK, KLOK_ES_LATCH, KLOK_ES_DATA, RegisterDecoder(KLOK_ES));*/

  /*TEST: ALLE gekozen aansluitpinnen zijn vrij om de registers aan te sturen
  ShiftRegister(CLOCK, 14, 15, RegisterDecoder(KLOK_ES));
  ShiftRegister(CLOCK, 16, 17, RegisterDecoder(KLOK_ES));
  ShiftRegister(CLOCK, 18, 19, RegisterDecoder(KLOK_ES));
  ShiftRegister(CLOCK, 20, 21, RegisterDecoder(KLOK_ES));
  ShiftRegister(CLOCK, 22, 23, RegisterDecoder(KLOK_ES));
  ShiftRegister(CLOCK, 24, 25, RegisterDecoder(KLOK_ES));
  ShiftRegister(CLOCK, 26, 27, RegisterDecoder(KLOK_ES));
  ShiftRegister(CLOCK, 28, 29, RegisterDecoder(KLOK_ES));   
  */
  
  // Weergave van score op scorebord
  ShiftRegister(CLOCK, SCORE_TT_LATCH, SCORE_TT_DATA, RegisterDecoder(SCORE_TT));
  ShiftRegister(CLOCK, SCORE_TE_LATCH, SCORE_TE_DATA, RegisterDecoder(SCORE_ET));
  ShiftRegister(CLOCK, SCORE_BT_LATCH, SCORE_BT_DATA, RegisterDecoder(SCORE_TB));
  ShiftRegister(CLOCK, SCORE_BE_LATCH, SCORE_BE_DATA, RegisterDecoder(SCORE_EB));
   
  // Weergave tijdsverloop op scorebord           
  ShiftRegister(CLOCK, KLOK_TM_LATCH, KLOK_TM_DATA, RegisterDecoder(KLOK_TM));  // minuten tientallen
  ShiftRegister(CLOCK, KLOK_EM_LATCH, KLOK_EM_DATA, RegisterDecoder(KLOK_EM));  // minuten eenheden
  ShiftRegister(CLOCK, KLOK_TS_LATCH, KLOK_TS_DATA, RegisterDecoder(KLOK_TS));  // seconden tientallen
  ShiftRegister(CLOCK, KLOK_ES_LATCH, KLOK_ES_DATA, RegisterDecoder(KLOK_ES));  // seconden eenheden
  
  // Weergave helften op scorebord
  ShiftRegister(HELFT_CLOCK, HELFT_LATCH, HELFT_DATA, SHIFT_CODE_HELFT);
}

void AddFiveMinutes() {
  
  for(int x = 0; x < 5; x++)
  {
    if(KLOK_EM < 9)
    {
      KLOK_EM++;
    }
    else
    {
      if(KLOK_TM < 9)
      {
        KLOK_TM++;
        KLOK_EM = 0; 
      }
      else
      {
        KLOK_TM = 0;
        KLOK_EM = 0;  
      }
    }
  }
}

void AddOneMinute() {

  if(KLOK_EM < 9)
  {
    KLOK_EM++;
  }
  else
  {
    if(KLOK_TM < 9)
    {
      KLOK_TM++;
      KLOK_EM = 0; 
    }
    else
    {
      KLOK_TM = 0;
      KLOK_EM = 0;  
    }
  }  
}

/* -----------------------------------------------------------------
 *      Functies voor tellen van scores
 *-----------------------------------------------------------------*/
 
void ScoreThuisCountPlus() {
  
  if(SCORE_ET < 9)
  {
    SCORE_ET++;
  }
  else
  {
    if(SCORE_TT < 9)
    {
      SCORE_TT++;
      SCORE_ET = 0;
    }
    else
    {
      SCORE_ET = 0;
      SCORE_TT = 0;
    }
  }
}

void ScoreThuisCountMin() {
  
  if(SCORE_ET > 0)
  {
    SCORE_ET--;
  }
  else
  {
    if(SCORE_TT > 0)
    {
      SCORE_TT--;
      SCORE_ET = 9;
    }
    else
    {
      SCORE_ET = 9;
      SCORE_TT = 9;
    }
  }
}

void ScoreBezoekCountPlus() {
  
  if(SCORE_EB < 9)
  {
    SCORE_EB++;
  }
  else
  {
    if(SCORE_TB < 9)
    {
      SCORE_TB++;
      SCORE_EB = 0;
    }
    else
    {
      SCORE_EB = 0;
      SCORE_TB = 0;
    }
  }
}

void ScoreBezoekCountMin() {
  
  if(SCORE_EB > 0)
  {
    SCORE_EB--;
  }
  else
  {
    if(SCORE_TB > 0)
    {
      SCORE_TB--;
      SCORE_EB = 9;
    }
    else
    {
      SCORE_EB = 9;
      SCORE_TB = 9;
    }
  }
}
 
 /* -----------------------------------------------------------------
 *      Functies voor helft
 *-----------------------------------------------------------------*/
 
void helftPlus() {
  
  if(HELFT < 3)
  {
    HELFT++;
  }
  else
  {
    HELFT = 0;
  }

  if(HELFT == 1)
  {
    SHIFT_CODE_HELFT = SHIFT_CODE_HELFT_1;
  }
  else if(HELFT == 2)
  {
    SHIFT_CODE_HELFT = SHIFT_CODE_HELFT_2;
  }
  else if(HELFT == 3)
  {
    SHIFT_CODE_HELFT = SHIFT_CODE_HELFT_3;
  } 
  else
  {
    SHIFT_CODE_HELFT = SHIFT_CODE_HELFT_0;
  }     
    
  Serial.println(SHIFT_CODE_HELFT);
}

 /* -----------------------------------------------------------------
 *      Functies voor timer
 *-----------------------------------------------------------------*/
 
  void timerReset() {
    
    KLOK_TM = 0;        // tientallen minuten
    KLOK_EM = 0;        // eenheden minuten
    KLOK_TS = 0;        // tientallen seconden
    KLOK_ES = 0;        // eenheden seconden
  }
 
 
 
 
/* -----------------------------------------------------------------
 *      Omvorming decimale waarden naar shiftregister-code
 *-----------------------------------------------------------------*/

int RegisterDecoder(int decimaal)
{
  int registercode;

  if (decimaal == 1)
  {
    return SHIFT_CODE_DEC_1;  
  }
  else if (decimaal == 2)
  {
    return SHIFT_CODE_DEC_2;  
  }
  else if (decimaal == 3)
  {
    return SHIFT_CODE_DEC_3;  
  }
  else if (decimaal == 4)
  {
    return SHIFT_CODE_DEC_4;  
  }
  else if (decimaal == 5)
  {
    return SHIFT_CODE_DEC_5;  
  }
  else if (decimaal == 6)
  {
    return SHIFT_CODE_DEC_6;  
  }
  else if (decimaal == 7)
  {
    return SHIFT_CODE_DEC_7;  
  }
  else if (decimaal == 8)
  {
    return SHIFT_CODE_DEC_8;  
  }
  else if (decimaal == 9)
  {
    return SHIFT_CODE_DEC_9;  
  }
  else
  {
    return SHIFT_CODE_DEC_0;  
  }
}`

[quote=“vincent11155, post:7, topic:854932”]
The arduino on the scoreboard indeed has a Arduino mega.
[/quote]That might not actually mean anything. What matters is the need for all those pins.

Hello,
You can also do both, keep the code for the web page and add a second ethernet channel (UDP by preference) that sends commands over Ethernet of WiFi.
Best Regards,
Johi.

the mega has already a webserver.
so you could use a webclient on the other device and send simple GET comands on each button press.

?buttonScoreBezoekMin

to the IP address of the mega:

http://192.168.1.9?buttonScoreBezoekMin

if there are all commands implemented on the webserver there is no need to change anything on the mega code.

1 Like

I tried this but I couldnt find any information. Could you maybe help me ?

Show the code you have tried on your client.
Show the hardware schematic including used components and wiring
Show clear pictures what you have built.

Describe clearly

  • what you have tried,
  • what you have expected to get and
  • what you got and
  • why the result is not what you expected.

“it’s not working” is just insufficent to provide any further help.

Hello,
I have tried to use an example code from the internet. But if we try to upload it to our arduino it wont succeed. this is the code I used from: ESP8266 NodeMCU HTTP GET and HTTP POST with Arduino IDE | Random Nerd Tutorials

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>

const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";

//Your Domain name with URL path or IP address with path
String serverName = "http://192.168.1.106:1880/update-sensor";

// the following variables are unsigned longs because the time, measured in
// milliseconds, will quickly become a bigger number than can be stored in an int.
unsigned long lastTime = 0;
// Timer set to 10 minutes (600000)
//unsigned long timerDelay = 600000;
// Set timer to 5 seconds (5000)
unsigned long timerDelay = 5000;

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

  WiFi.begin(ssid, password);
  Serial.println("Connecting");
  while(WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.print("Connected to WiFi network with IP Address: ");
  Serial.println(WiFi.localIP());
 
  Serial.println("Timer set to 5 seconds (timerDelay variable), it will take 5 seconds before publishing the first reading.");
}

void loop() {
  //Send an HTTP POST request every 10 minutes
  if ((millis() - lastTime) > timerDelay) {
    //Check WiFi connection status
    if(WiFi.status()== WL_CONNECTED){
      HTTPClient http;

      String serverPath = serverName + "?temperature=24.37";
      
      // Your Domain name with URL path or IP address with path
      http.begin(serverPath.c_str());
      
      // Send HTTP GET request
      int httpResponseCode = http.GET();
      
      if (httpResponseCode>0) {
        Serial.print("HTTP Response code: ");
        Serial.println(httpResponseCode);
        String payload = http.getString();
        Serial.println(payload);
      }
      else {
        Serial.print("Error code: ");
        Serial.println(httpResponseCode);
      }
      // Free resources
      http.end();
    }
    else {
      Serial.println("WiFi Disconnected");
    }
    lastTime = millis();
  }
}

We use the Sparfun8266 wifi shield

a) it makes no sense to try to upload an esp8266 sketch to an Arduino. You have to decide if you programm the ESP8266 or the Arduino.
Search for an client example based for the Arduino - for your shield.

Honestly, I just think you have bought the wrong product.
Get a NodeMCU or a Wemos D1 and programm the ESP8266.

b) your server sketch in #7 starts the server at

EthernetServer server(80);

That’s port 80.

in the example of #14 you try to connect to port 1880.

You must connect to the right port. That is 80.

Hello,
I am now trying to send a GET comand but I dont know how to start.

This is the code of the wifshield it connects with the ethernet webserver:

#include <SoftwareSerial.h> // Include software serial library, ESP8266 library dependency
#include <SparkFunESP8266WiFi.h> // Include the ESP8266 AT library
ESP8266Client client; // Create a client object
int x = 1;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);



if (esp8266.begin()) // Initialize the ESP8266 and check it's return status
    Serial.println("ESP8266 ready to go!"); // Communication and setup successful
else
    Serial.println("Unable to communicate with the ESP8266 :(");


int retVal;
retVal = esp8266.connect("WiFi-2.4-0B6B", "B9B447AAC6");
if (retVal < 0)
{
    Serial.print(F("Error connecting: "));
    Serial.println(retVal);
}

retVal = client.connect("192.168.1.149", 80); // Connect to sparkfun (HTTP port)
if (retVal > 0)
    Serial.println("Successfully connected!");
}

void loop() {
/*client.print("data" + String(x) + "\n\n");
Serial.println(x);
delay(1000);
x++;*/

client.print("GET /?buttonScoreThuisPlus=1");
delay(1000);
}