Hi there i try to make an alarm with arduino and i have an lcd on it but my lcd have some strange marks and are not in the code
Can anyone help me please?
Just a couple suggestions to help you figure it out and make the code a little easier to debug for everyone.
1 - what is the floating number for? Probably wrap that in a constant so that the code is a bit more readable (will help us debug it).
2 - the line that says a=(analogRead(analogPin)/42.656). You've already read the pin and stored the value in val. Why not use val here instead of reading the pin twice.
3 - what does it display if you set a to a set number (like 4,8, 24, etc.) Does it display correctly? If not, then it's something with the LCD setup, if it does, then it might be the weird math issue mentioned above.
DigitalPin3 = 3;
AnalogPin3 = A3;
You are trying to use the same pin for both unless you put an "A" in front of the analog pin as above.
No Lcd use Digital pin 3 and
divider the analog pin 3