Arduino beginner here working on a stopwatch, currently the display is very bright but doesn't show the actual text, from what I've been seeing online this is most likely an issue with the potentiometer, no matter how much I move the potentiometer or even remove it nothing happens at all, so that's most likely the issue. I will show you the code and pictures of the actual schematic +a picture of the build on tinkercad where I tested it and without issue and just in case the potentiometer has a 250kΩ value and the resistors have 1kΩ, I can also take a picture of the potentiometer if needed, pretty much all I've done with it is connect the left pin to + right to - and the middle one to V0 of LCD
Here's the code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int ssButton = 9;
int resButton = 8;
unsigned long startMillis, Sec, Min;
void setup() {
lcd.begin(16, 2);
pinMode(ssButton, INPUT);
pinMode(resButton, INPUT);
Serial.begin(9600);
lcd.setCursor(3,0);
lcd.print("CRONOMETRU");
lcd.setCursor(5,1);
lcd.print("00:00");
}
void loop() {
int val1 = digitalRead(ssButton);
int val2 = digitalRead(resButton);
if(digitalRead(ssButton) == 1){
delay(200);
lcd.clear();
lcd.setCursor(3,0);
lcd.print("CRONOMETRU");
lcd.setCursor(5,1);
lcd.print("00:00");
startMillis = millis();
while(1){
if(digitalRead(ssButton) == 1 || digitalRead(resButton) == 1){
delay(200);
break;
}
Sec = ((millis()-startMillis)/1000)%60;
Min = ((millis()-startMillis)/60000)%60;
lcd.setCursor(5,1);
if(Min < 10){
lcd.print("0");
lcd.print(Min);
}
else{
lcd.print(Min);
}
lcd.print(":");
if(Sec < 10){
lcd.print("0");
lcd.print(Sec);
}
else{
lcd.print(Sec);
}
}
}
if(digitalRead(resButton) == 1){
lcd.setCursor(5,1);
lcd.print("00:00");
}
}
The tinkercad picture of how it should work
The build:
If anyone could help I would be really grateful.