Relay problem from a new Arduino user

Hi everyone.
I am new to programming and have an arduino uno. I have made a simple programme to charge my supercapacitors and have it working fine. But now I wish to change things a little and that is where I am having my problems.
This is what I am using at the moment. I have 2, 2.7 volt supercapacitors in series making 5.4 volts running a simple electronics project and I wish to use my arduino to rum my charging circuit at 2 different voltages i.e. 2.7 volts and 5.4 volts for different electronics projects. I have built a simple charger to run off of my arduino and it works fine I just connect my arduino up and it keeps my circuit running fine and the 3 leds give me an idea of the state of charge for my supercapacitors. This is my programme.
5.35v supercap charger

int sensePin =0;
int relayPin = 9;
int lowledPin = 12;
int okledPin = 11;
int fullchargePin = 13;
void setup(){
 analogReference (DEFAULT);
 pinMode (relayPin, OUTPUT);
 pinMode (lowledPin, OUTPUT);
 pinMode (okledPin, OUTPUT);
 pinMode (fullchargePin, OUTPUT);
Serial.begin(9600); 
}

void loop() {
  int val = analogRead(sensePin);
  if(val <300) digitalWrite(relayPin, HIGH);
  if (val <99) digitalWrite (lowledPin, LOW);  
   if(val >100) digitalWrite (lowledPin, HIGH);
   if (val >450) digitalWrite(okledPin, HIGH);
   if (val <329) digitalWrite(okledPin, LOW);
  if(val>530
  ) digitalWrite(relayPin, LOW);
 if(val <490) digitalWrite(fullchargePin, LOW);
  
  else digitalWrite(fullchargePin, HIGH);
  

  Serial.println(analogRead(sensePin));
  delay(2000);
}

Moderator edit: CODE TAGS added.

I want to modify this charger to use one led to be an indicator and use a push button to control my charger

This is what I would like the charger to do to do.
Press button and hold for one second led flashes once relay latches charges to 2.65 volts then relay unlatches led flashes until button is pressed again.
Press button and hold for two seconds led flashes twice, relay latches and charges to 5.35 volts then relay unlatches, led will flash until button is pressed
I go the idea from this video on you tube (link below) but this guy is not willing to help. He is happy to sell me a kit which I thought about but I am sure this can be done on my uno but I do not know where to start Thank you for taking the time to read my post