Hello everybody ,im a beginner and it's the first time i publish some in this forum.Yesterday i decided to try this project of reproduce a custom text on the lcd by arduino.I spent some minutes and hours to reach my objective but from yesterday the lcd won't program text,but some squares in the entire first line (the one I was interested in programming custom text).I retryed some times to redo the circuit but the results where the same:squares in the first line.
My last diagram i used was connected in this method:
|-----------------------------------------------------------|
| |
|_________________________________________________________|
1° PIN bridge (with jumper) to -
2° PIN bridge to +
3° PIN BRIDGE TO MID PIN OF POTENTIOMETER
4°PIN BRIDGE TO 7 OF DIGITAL PIN OF ARDU UNO
5° PIN BRIDGE TO -
6° PIN TO 8 DIGITAL PIN
10°(D3) PIN TO 9 DIGITAL PIN
11°(D4) PIN TO 10 DIGITAL PIN
12° (D5) PIN TO 11 DIGITAL PIN
13° (D6) PIN TO 12 DIGITAL PIN
14° (D7) TO 13 DIGITAL PIN
15° (A) PIN BRIDGE TO +
16°(K)PIN BRIDGE TO -
POTENTIOMETER: FIRST LEG TO + MIDDLE TO LCD PIN 3 OTHER LEG TO -
ARDUINO OTHER CONNECTION'S:5V GOES TO + AND GND GOES TO -
I used too different codes but as my unlucky says the result where the same,pls
if you have something for help me reply this post,i will appreciate a lot!
Thanks all for a reply
You need to go and read the forum instructions so that you can go back and modify your original post (not re-post it) - using the "More -> Modify" option below the right hand corner of your post - to mark up your code as such using the "</>" icon in the posting window. Just highlight each section of code (or output if you need to post that) from the IDE and click the icon.
In fact, the IDE itself has a "copy for forum" link to put these markings on a highlighted block for you so you then just paste it here in a posting window. But even before doing that, don't forget to use the "Auto-Format" (Ctrl-T) option first to make it easy to read. While you may be lucky so far, If you do not post it as "code" it can easily be quite garbled and is always more difficult to read due to the font.
It is inappropriate to attach it as a ".ino" file unless it is clearly too long to include in the post proper. Yours clearly is not. People (including me) can usually see the mistakes directly and do not want to have to actually load it in their own IDE. And even that would also assume they are using a PC and have the IDE running on that PC.
Also tidy up your blank space. Do use blank lines, but only single blanks between complete functional blocks.
Now, more specifics. It appears from your description you are seeing the "blocks" on the first line. This means the display is simply not being accessed by your code and wiring. Do not connect the potentiometer to 5 V. This is an old and stupid mistake, blindly propagated from one design to the next but however in no way prevents the display from working, just makes it more difficult. If using a 10k potentiometer, connect both ends to ground. Makes the contrast setting much easier.
I note you have pin 10 of the LCD connected. This is useless but if you are using it in your code, it means you must implicitly have the descriptor wrong. Pin 10 has no function when using the 4-bit mode as you are (and should be).
Your constructor is: LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
which means in Arduino language:
pin 1: GND, pin 2; 5V, pin 3, wiper of potentio meter, with ONE other leg of potentio meter to GND, pin 4: D7 Arduino, pin 5: GND, pin 6: D8 Arduino, next four pins of LCD not connected, pin 11: pin D9 Arduino, pin 12: pin D10 Arduino, pin 13: pin D11 Arduino, pin 14: pin D12 Arduino, pin 15: 3V (this is LED backlight of LCD, needs 3V and no more) pin 16: GND).
The delay () in your sketch is unnecessary because it is in Setup, i.e. that part of the sketch that is executed only once.
Have a look at thesolaruniverse article on LCD and Arduino
Thank you for help,i tryed 2 more codes and schematics,but unfortunately it doesn't worked for these 2 times.I talked with a friend and he don't know what the problem is,but we arrived to a conclusion:Potentiometer.He will give me a new potentiometer for try if it can works good.Anyway,thank you 1000 for the help!
OK now, you do not seem to have understood my explanation above.
Please confirm that you have the backlight working. If it is not you have problems with the wiring or power supply.
If you are seeing the "blocks" on the first line, then your potentiometer is actually working. if you do not see the blocks, then just try a 220 Ohm resistor from pin 3 to ground.
Pleas post your present code as requested in #1. Your initial description of your wiring is clearly wrong, but unless you actually post your code in the thread I cannot check it.
A photo - taken in outside daylight but not in full sunlight or in a dark room - showing everything would be a help.
I have lodged a memo on the site that photoncatcher mentions. The diagram correctly shows the potentiometer not connected to 5 V but a 1k potentiometer is preferable.
I found a post that suggested removing the potentiometer and instead connecting pin 3 of the LCD display to a PWM port on the Arduino and adding the following to the setup section in your code to set the contrast. I used pin 6. Contrast values between 10 and 20 should work. I used 15 and it worked fine.
maulepilot:
I found a post that suggested removing the potentiometer and instead connecting pin 3 of the LCD display to a PWM port on the Arduino and adding the following to the setup section in your code to set the contrast
Yes. You found that post.
Very bad and worthless idea, causes flickering of the display if you use any PWM value significantly greater than zero.
You will get the same contrast effect - but less flicker - by connecting pin 3 of the LCD directly to ground.
Paul__B:
OK now, you do not seem to have understood my explanation above.
Please confirm that you have the backlight working. If it is not you have problems with the wiring or power supply.
If you are seeing the "blocks" on the first line, then your potentiometer is actually working. if you do not see the blocks, then just try a 220 Ohm resistor from pin 3 to ground.
Pleas post your present code as requested in #1. Your initial description of your wiring is clearly wrong, but unless you actually post your code in the thread I cannot check it.
A photo - taken in outside daylight but not in full sunlight or in a dark room - showing everything would be a help.
I have lodged a memo on the site that photoncatcher mentions. The diagram correctly shows the potentiometer not connected to 5 V but a 1k potentiometer is preferable.
Paul__B:
OK now, you do not seem to have understood my explanation above.
Please confirm that you have the backlight working. If it is not you have problems with the wiring or power supply.
If you are seeing the "blocks" on the first line, then your potentiometer is actually working. if you do not see the blocks, then just try a 220 Ohm resistor from pin 3 to ground.
Pleas post your present code as requested in #1. Your initial description of your wiring is clearly wrong, but unless you actually post your code in the thread I cannot check it.
A photo - taken in outside daylight but not in full sunlight or in a dark room - showing everything would be a help.
I have lodged a memo on the site that photoncatcher mentions. The diagram correctly shows the potentiometer not connected to 5 V but a 1k potentiometer is preferable.
Anyway,the backlight is working and,i see the blocks on the first text leg,but i don't see any text printed on it,neither I see text in the old code nor in the one recommended by photoncatcher.I will try the new asset and I'll let you know if it goes or not.Thank you all for help
Wiring:Ok!
Code:Ok!
lcd backlight:Ok too!
lcd:Ok!
But something went wrong...i think i have to change the potentiometer,i will try a new one of 1kOhms as you suggested to me.
hello_its_me:
But something went wrong...i think i have to change the potentiometer,i will try a new one of 1kOhms as you suggested to me.
No, you clearly have the blocks displayed, there is no reason to be concerned about the potentiometer.
For whatever reason, the LCD is not responding to your code at all. In that dim light, we cannot see your connections but I notice you are using the "bunch of 65" jumper wires. We have known them to be faulty from time to time, you need to test all of them (by using each of them in turn to connect the backlight) that you use to connect pins 4 to 6 and 11 to 14 of the LCD. The fact that the blocks are visible demonstrates that the connections to pins 1 to 3 , 15 and 16 are working.
Also as we have been caught by this before, please confirm that you have actually connected the LCD to the pin header that is inserted in the breadboard. Sometimes we engage in great discussion before finding out that they had not been soldered.