I need help with a home project

Hi,

I Have uploaded my program to the arduino succesfully. The arduino begins a server. I use the MIT app inventor 2 to send to the http:// address of my arduino an H which should close a relay on pin 6 and send me an analog read of pin A0. It sends the analog read back to me correctly but when it has to close the relay it doesn’t want to do that.Inhave also messured the voltage on the pins and when i send the command it doesn’t change at all

The program that i used is this.

Note i am a newbie at programming so feel free to correct any of the mistakes i have probably done

Thanks for anyone that bothers to reply

#include <SPI.h>
#include <WiFi101.h>

int lcontrol = 6;
int lcontrol2 = 7;
int lcontrol3 = 9;
int lcontrol4 = 8;
int lcontrol5 = 10;
char ssid[] = "Name"; 
char pass[] = "Password";

int keyIndex = 0;

int status = WL_IDLE_STATUS;
 
WiFiServer server(80);

void setup() {
   // Uncommon serial for debugging and to see details of WiFi connection
  // Serial.begin (9600);
  // while (!Serial) {
     // wait for serial port to connect. Needed for native USB port only
//   }
   if  (WiFi.status() == WL_NO_SHIELD) {
    while (true);
   }
   while (status != WL_CONNECTED) {
    status = WiFi.begin(ssid, pass);
    delay(10000);
   }
   server.begin();
}

void loop() {
  WiFiClient client = server.available();

  if(client) {
    String currentLine ="";
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        if (c == '\n') {

          if (currentLine.length() == 0) {
            client.println("HTTP/1.1 200 OK");
            client.println("Content-type:text/html");
            client.println();
            client.print("Value at A0 is ");
            client.print(analogRead(A0));
            client.print("
");
            client.println();
            break;
          }
          else {
            currentLine = "";
          }
        } 
        else if (c !='\r'){
          currentLine  += c;
        }
          
          if(currentLine.endsWith("GET/H")) {
            digitalWrite(lcontrol,HIGH);
          }
          if (currentLine.endsWith("GET/L")) {
            digitalWrite(lcontrol,LOW);
          }
          if (currentLine.endsWith("GET/A")) {
            digitalWrite(lcontrol2,HIGH);
          }
          if (currentLine.endsWith("GET/B")) {
            digitalWrite(lcontrol2,LOW);
          }
          if (currentLine.endsWith("GET/C")) {
            digitalWrite(lcontrol3,HIGH);
          }
          if (currentLine.endsWith("GET/D")) {
            digitalWrite(lcontrol3,LOW);
          }
          if (currentLine.endsWith("GET/E")) {
            digitalWrite(lcontrol4,HIGH);
          }
          if (currentLine.endsWith("GET/F")) {
            digitalWrite(lcontrol4,LOW);
          }
          if (currentLine.endsWith("GET/G")) {
            digitalWrite(lcontrol5,HIGH);
          }
          if (currentLine.endsWith("GET/H")) {
            digitalWrite(lcontrol5,LOW);
          }
        }
      }
    }
  }

Try adding some pinMode calls in setup for the pins your relays are on.