LCD 16x2 prints correctly in setup but garbage in loop

i am trying to get the lcd to print the values for the variable displaynote but i was just getting garbage so i tried fiddling around a bit with the lcd within the program and for some reason if i print something in setup it prints fine but if i print the same thing in loop i just get garbage. the lcd works fine in other programs loops just not in this one.

code is <#include <LiquidCrystal.h>
int x = 110;
int tuningCounter = 0;
int stringCounter = 0;
int stringfreqency = 0;
int sizeCounter = 2;
int button3State = 0;
int button3OldState = 0;
int button1State = 0;
int button1OldState = 0;
int button2State = 0;
int button2OldState = 0;
int freqencytarget = 0;
String displaynote;
const int rs = 5, en = 4, d4 = 3, d5 = 2, d6 = 1, d7 = 0;
const int button1 = 6;
const int button2 = 7;
const int button3 = 8;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int tuningArray[3][8]= {{46, 62, 82, 110, 147, 196, 247, 330},
{44, 58, 78, 104, 139, 185, 233, 311},
{32 ,55, 77, 100, 136, 178, 225, 298}};
String noteblock[3][8] = {{"F#", "B", "E", "A", "D", "G", "B", "E"},
{"F", "Bb", "Eb", "G#", "C#", "F#", "Bb", "eb"},
{"A" ,"B", "C", "D", "E", "F", "G", "H"}};

void setup() {
lcd.begin(16, 2);
lcd.print("hello");
delay(1000);
lcd.clear();
pinMode(button1, INPUT);//setting up input pins
pinMode(button2, INPUT);
pinMode(button3, INPUT);
Serial.begin(9600);//alows printing in for debug
}

void loop() {
button1State = digitalRead(button1);//setting up states
button2State = digitalRead(button2);
button3State = digitalRead(button3);
delay(100);//delay to stop button bouncing ideally dosent quite yet not sure why
if (button3State != button3OldState) {
if (button3State == HIGH) {
tuningCounter++;
delay(50);
Serial.println(tuningCounter);
lcd.print("hello");
lcd.setCursor(0,0);

}
if (tuningCounter > 2) {
tuningCounter = 0;
}
} else if (button2State != button2OldState) {
if (button2State == HIGH) {
sizeCounter--;
stringCounter = 0;
}
if (sizeCounter < 0) {
sizeCounter = 2;
}
Serial.println(sizeCounter);
button2OldState = button2State;
} else if (button1State != button1OldState) {
if (button1State == HIGH) {
stringCounter++;
}
if (sizeCounter + stringCounter > 7) {
stringCounter = 0;
}
freqencytarget = (tuningArray[tuningCounter][sizeCounter + stringCounter]);
displaynote = (noteblock[tuningCounter][sizeCounter + stringCounter]);
Serial.print(displaynote);
Serial.print(freqencytarget);
button1OldState = button1State;
}
}>

...
const int rs = 5, en = 4, d4 = 3, d5 = 2, d6 = 1, d7 = 0;
...
LiquidCrystal lcd(rs, en, d4, d5, d6, d7); 
...
           Serial.println(tuningCounter); 
...

Choose different pins for d6, d7. You never want to share with Serial.

David.

thank you i will just test this

problem sorted thank you very much