having trouble getting lcd to display right values

hello I am very new to coding but have a background in electronics. I want to learn so I started by getting an RGB led to light up and be able to control each channel. Then I learned how to read the voltage using a pot, then I got an lcd to work. Now I want to combine all of them and I have the RGB values displayed on a 0-255 scale. Since I only have a two line display I only was trying to display two of the values for now while I wait on another bigger LED display to arrive. I copyed and pasted most of my code from other examples and tutorials so I am sure that my problem lies some where within it.
Here is my code and all the connections to the lcd are
Pin K- Ground
PinA-D 5V
PinD7-D5
PinD6-D4
PinD5-D3
PinD4-D2
and I think all the other pins are listed in the code.
Using the LCD that came with the Arduino Uno and a 1Kpot
You can see in the pictures that I am getting some kind of measurement on the LCD and the led works but not what I am looking for as far as values and whats supposed to be on the screen vs my code.

Let me know what I am doing wrong. I want to learn.
Thank you

/*
* Code for making one potentiometer control 3 LEDs, red, grn and blu, or one tri-color LED
* The program cross-fades from red to grn, grn to blu, and blu to red
* Clay Shirky <clay.shirky@nyu.edu> 
*/

#include <LiquidCrystal.h>

LiquidCrystal lcd(7,8,2,3,4,5);

int potPin = 3; // Potentiometer output connected to analog pin 3
int potVal = 0; // Variable to store the input from the potentiometer

// LED's cathodes should be connected to digital GND
int redPin = 9;   
int grnPin = 10;  
int bluPin = 11;  

// Program variables
int redVal = 0;   // Variables to store the values to send to the pins
int grnVal = 0;
int bluVal = 0;
  
void setup()
{
  lcd.begin(16, 2);
lcd.clear();
pinMode(potPin, INPUT);
  pinMode(redPin, OUTPUT);   // sets the pins as output
  pinMode(grnPin, OUTPUT);   
  pinMode(bluPin, OUTPUT); 
}

// Main program
void loop()
{
  lcd.setCursor(0,0); // Sets the cursor to col 0 and row 0

  potVal = analogRead(potPin);   // read the potentiometer value at the input pin

  if (potVal < 341)  // Lowest third of the potentiometer's range (0-340)
  {                  
    potVal = (potVal * 3) / 4; // Normalize to 0-255

    redVal = 256 - potVal;  // Red from full to off
    grnVal = potVal;        // Green from off to full
    bluVal = 1;             // Blue off
  }
  else if (potVal < 682) // Middle third of potentiometer's range (341-681)
  {
    potVal = ( (potVal-341) * 3) / 4; // Normalize to 0-255

    redVal = 1;            // Red off
    grnVal = 256 - potVal; // Green from full to off
    bluVal = potVal;       // Blue from off to full
  }
  else  // Upper third of potentiometer"s range (682-1023)
  {
    potVal = ( (potVal-683) * 3) / 4; // Normalize to 0-255

    redVal = potVal;       // Red from off to full
    grnVal = 1;            // Green off
    bluVal = 256 - potVal; // Blue from full to off
  }

  lcd.setCursor(0,0); // Sets the cursor to col 0 and row 0
  lcd.print("Red Value: "); // Prints Sensor Val: to LCD
  lcd.print(analogRead(redVal)); // Prints value on Potpin1 to LCD
  lcd.setCursor(0,1); // Sets the cursor to col 1 and row 0
  lcd.print("Blue Value: "); // Prints Sensor Val: to LCD
  lcd.print(analogRead(bluVal)); // Prints value on Potpin1 to LCD
  lcd.setCursor(7,0); // Sets the cursor to col 0 and row 0


  analogWrite(redPin, redVal);   // Write values to LED pins
  analogWrite(grnPin, grnVal); 
  analogWrite(bluPin, bluVal);  
}

Pay attention.
You use …val lyke a analog value for the …pin, ABD like the number of the analog pinbfor the read of the …chanal. Please see carefully the lcd… loop secrion and the analogWrite loop section

  lcd.print(analogRead(redVal)); // Prints value on Potpin1 to LCD

It most certainly does NOT do that.

Silente: Pay attention. You use ...val lyke a analog value for the ...pin, ABD like the number of the analog pinbfor the read of the ...chanal. Please see carefully the lcd.... loop secrion and the analogWrite loop section

Thanks for your reply, I don't quite understand what it is that your trying to say to me.

PaulS:   lcd.print(analogRead(redVal)); // Prints value on Potpin1 to LCD

It most certainly does NOT do that.

Yes PaulS that is what I am trying to fix. Any thoughts? Or is what your saying supposed to be a solution that I am just not understanding?

Or is what your saying supposed to be a solution that I am just not understanding?

Look at that line of code. What does analogRead() take as input?

It takes a pin number. Is redVal a pin number?

It looks to me like you want to print the value in redVal on the LCD, not use it as a pin number.

Jacamo: I copyed and pasted most of my code from other examples and tutorials so I am sure that my problem lies some where within it.

Ah yes, the "throw everything at the wall and see what sticks" approach to programming.

lcd.print(analogRead(redVal)); // Prints value on Potpin1 to LCD

That line does not do what you seem to think it does. You should read: https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/ analogRead() expects you to specify a pin number. redVal is not a pin number.

Since I only have a two line display I only was trying to display two of the values for now while I wait on another bigger LED display to arrive.

No need. All three values can fit comfortably on one line of the display.

odometer: Ah yes, the "throw everything at the wall and see what sticks" approach to programming.

Do you have any suggestions on how else to go about learning how program? This is my very first attempt at programming anything at all so please bear with me as I may sound like I don't know what the hell I am talking about, since I don't. So from what I under stand that function can only read an analog pin. I changed the pin to the one the pot is hooked up to and i can get a stable reading now. I still don't have the right text displayed nor do I really have what I am looking for. But none the less a step in the right direction. So how would I be able to read the value of each individual channel of the RGB led if I can only read an analog pin? There has to be a way I am just not experienced enough to see it. Thanks for your help so far

You can't read an analog pin, you can read all the analog pins, so you can read all the pins for RGB. Pay only attention at the variables.

So your saying my solution would be to hook up my LED to both the analog pins as an input and the PWM digital as an output? Just make sure I define my variables?

But I have a question: why have you to have an input on something you controll? If you control the RGB strip it can never be in a state different respect the one you want. And if it can be the strip DOESN'T WORK and you kave to change it. Ir they are no only leds, but there are some sensors or bottons?

Jacamo:
So your saying my solution would be to hook up my LED to both the analog pins as an input and the PWM digital as an output? Just make sure I define my variables?

Look again at the code that you posted at the start of this thread.
Do you have any clue of what any of it is meant to be doing? Or is it all magic to you?

What is this supposed to be doing, and how?

  if (potVal < 341)  // Lowest third of the potentiometer's range (0-340)
  {                  
    potVal = (potVal * 3) / 4; // Normalize to 0-255

    redVal = 256 - potVal;  // Red from full to off
    grnVal = potVal;        // Green from off to full
    bluVal = 1;             // Blue off
  }

(Actually, I don’t understand why it doesn’t set bluVal to 0 for off, nor why it allows redVal to climb as high as 256. Maybe whoever wrote it doesn’t know what their doing. Or maybe they know something I don’t. More likely the former.)

What is this supposed to be doing, and how?

  analogWrite(redPin, redVal);   // Write values to LED pins
  analogWrite(grnPin, grnVal);
  analogWrite(bluPin, bluVal);

So, what is the analogRead doing here?

  lcd.print(analogRead(redVal)); // Prints value on Potpin1 to LCD

Why did you include the analogRead in that line?
What are you trying to read, and more importantly, why are you trying to read it?
What leads you to believe that it is necessary to read anything there?