Two LEDs controlled with potentiometer. One to blink fast/ other slow

Hey i am a noob. Trying to get one led to blink fast whilst a second led to blink slow and when i turn the potentiometer the fast one will slow and the slow one will increase in speed.
Have Arduino Uno so i can't use the Scheduler.
Here is my code thus far. No errors but not doing what i would like it to.

int sensorPin = 0;    // The potentiometer is connected to
                      // analog pin 0
                      
int ledPin = 13;      // The LED is connected to digital pin 13
int ledPin2 = 12;      // The LED is connected to digital pin 12
int sensorValue;

void setup() 
{
  pinMode(ledPin, OUTPUT);
  pinMode(ledPin2, OUTPUT);
}

void loop() // this function runs repeatedly after setup() finishes
{
lights1();
lights2();  
}

void lights1(){
  sensorValue = analogRead(sensorPin);    
  digitalWrite(ledPin, HIGH);     // Turn the LED on
  delay(sensorValue);             // Pause for sensorValue
  digitalWrite(ledPin, LOW);      // Turn the LED off
  delay(sensorValue);             // Pause for sensorValue
  }

void lights2(){
  int newSensorValue;
  newSensorValue = map(sensorValue, 0, 1023, 1023, 0);
  sensorValue = analogRead(sensorPin);   
  digitalWrite(ledPin2, HIGH);     // Turn the LED on
  delay(newSensorValue);             // Pause for sensorValue 
  digitalWrite(ledPin2, LOW);      // Turn the LED off
  delay(newSensorValue);             // Pause for sensorValue
  }

+1 Karma for using code tags on your first post. But you still made a noob mistake:

not doing what i would like it to

Think about how much that will help us to understand your problem.

  newSensorValue = map(sensorValue, 0, 1023, 1023, 0);
  sensorValue = analogRead(sensorPin);

Check the order in which you have these 2 lines

Thanks Heaps. That has kinda helped.

That's got it kind of right. The issue is both loops are running one after another instead of simultaneously. I want one to constantly blink fast and the other to constantly blink slow, the when i turn the potentiometer the fast one slows down whilst the slow one speeds up. Is there any way to run them simultaneously?

Thanks again.

Of course there is. :roll_eyes:

Look/ search for a topic called "Blink without delay". "delay()" is not useful in "real world" code.

Is there any way to run them simultaneously?

See Using millis() for timing. A beginners guide, Several things at the same time and look at the BlinkWithoutDelay example in the IDE.