need some help with my 27mc arduino project

hey all i am stuck with my 27mc (cb) project how can help me out
i want to make a signaal meter and fox beeper in one bud i am suck with the script

the plan is when the arduino nano is powered on i can se the signaal meter and is the fox beeper in of
if i set the second switch on the signaal meter and the fox beeper are both in funktion

here is the script i have
//vossepiep en S meter
//vertie 1
//tom vdm
//25/12/2018

//libery
#include “LiquidCrystal_I2C.h”
#include “Wire.h”

// lcd pin A4 SDA A5 SCL
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address old adres 0x27

#define length 16.0
#define wait 3
#define tijd 10

double percent=100.0;
unsigned char b;
unsigned int peace;

int freq = 0;
int pin_switch = 2; // pin 2 druknop
int relaisState = LOW; // relais statis

// custom characters

const int relaisPin = 10; // pin 10 relais
const int piepPin = 8; // pin 8 piep

unsigned long previousMillis = 0; // bij 0 relais update hi /low

const long intervalrelais = 60000; // interval (milliseconds)60 sec

byte p1[8] = {
B0001,
B0001,
B0001,
B0001,
B0001,
B0001,
B0001,
B0001};

byte p2[8] = {
B11000,
B11000,
B11000,
B11000,
B11000,
B11000,
B11000,
B11000};

byte p3[8] = {
B11100,
B11100,
B11100,
B11100,
B11100,
B11100,
B11100,
B11100};

byte p4[8] = {
B11110,
B11110,
B11110,
B11110,
B11110,
B11110,
B11110,
B11110};

byte p5[8] = {
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111};

void setup() {
pinMode(piepPin, OUTPUT); //geluid uitgang
pinMode(relaisPin, OUTPUT); // set the digital pin as output:

delay(100);
lcd.createChar(0, p1);
lcd.createChar(1, p2);
lcd.createChar(2, p3);
lcd.createChar(3, p4);
lcd.createChar(4, p5);

lcd.begin(20, 4);
lcd.backlight();
lcd.clear();
lcd.setCursor( 1, 2);
lcd.print(“Vossepiep V0.4 !”);
lcd.setCursor( 1, 4);
lcd.print("Stand Bay ");
}

void loop()
{
lcd.setCursor(0,0);

//ADC conversion

unsigned int value = analogRead(0);

percent = value/1524.0*150.00;

//lcd.print(" S meter ");

//lcd.print(" - ");

lcd.print(percent);
lcd.print(" % signaal ");

lcd.setCursor(0,1);

double a=length/100*percent;

// drawing black rectangles on LCD

if (a>=1) {

for (int i=1;i<a;i++) {
lcd.write(4);
b=i;
}

a=a-b;

}

peace=a*5;

// drawing character’s colums

switch (peace) {

case 0:

break;

case 1:
lcd.print((char)0);
break;

case 2:
lcd.write(1);
break;

case 3:
lcd.write(2);
break;

case 4:
lcd.write(3);
break;

}

//clearing line
for (int i =0;i<(length-b);i++) {
lcd.print(" ");
}
;
}

if else pin_switch=HIGH
}

relais();
if (relaisState == LOW) {
geluid();
lcdinfo();
}
if (relaisState == HIGH) {
lcdstate();
}
}

void lcdstate()
{
lcd.clear();
lcd.setCursor( 1, 2);
lcd.print(“Vossepiep V0.4 !”);
lcd.setCursor( 1, 4);
lcd.print(“Piep off air”);

}
void lcdinfo()
{
lcd.clear();
lcd.setCursor( 1, 2);
lcd.print(“Vossepiep V0.4 !”);
lcd.setCursor( 1, 4);
lcd.print(“Piep on air”);

}
//void lcdptttoets()
//{
// lcd.clear();
// lcd.print(“U kunt nu de mic”);
// lcd.setCursor( 0, 1);
// lcd.print(“gebruiken!!!”);
//}

void relais()
{
unsigned long currentMillis = millis();

if (currentMillis - previousMillis >= intervalrelais) {

previousMillis = currentMillis;

// if the relais is off turn it on and vice-versa:
if (relaisState == LOW) {
relaisState = HIGH;

} else {
relaisState = LOW;
}

digitalWrite(relaisPin, relaisState);

}
}

void geluid()
{
for (freq = 500; freq < 1000; freq += 1) {
tone(piepPin, freq, tijd); // Beep pin, freq, time
delay(wait);
}
for (freq = 1000; freq > 500; freq -= 1) {
tone(piepPin, freq, tijd); // Beep pin, freq, time
delay(wait);
}

}

So what does that improperly posted code do? How is that different from what you want the code to do?

Read the how to use this forum-please read sticky to see how to post code and some hints on how to ask a good question. See #7 & 11.

Following the forum guidelines will get you more and faster help.