Start simple
Try this
int previousPotValue = analogRead(A7);
void setup()
{
Serial.begin(115200);
}
void loop()
{
int currentPotValue = analogRead(A7);
if (currentPotValue != previousPotValue)
{
Serial.print("pot value changed to ");
Serial.println(currentPotValue);
}
previousPotValue = currentPotValue;
}