The hello world tutorial has not been functioning on my UNO to standard 16x 2 LCD. Below is a copy of the code I uploaded and a photo of the circuit.
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7,8,9,10,11,12);
void setup() {
// set up the LCD's number of columns and rows:
lcd.display();
delay(200);
lcd.begin(16, 2);
delay(200);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
//lcd.setCursor(0, 1);
// print the number of seconds since reset:
// lcd.print(millis() / 1000);
}
@2trillion: I've never used a 16x2 LCD before, so I don't know if this advice will help or not. The commented out code in the loop() says that you need to set the cursor position. The following line sets your cursor position but is commented out:
// lcd.setCursor(0, 1);
Try copying that line and putting it in the setup() above this line:
He has commented out everything in loop() which is an excellent idea when one is trying to troubleshoot a non-functioning LCD.
He does not have to initially position the cursor to the beginning of the first line since that is done during the initialization of the LCD controller. What is the logic behind your advice to display his message on the second line?
As soon as he hooks up the missing wire his device is likely to work. Then he can remove the extra steps that he added in setup() and it will probably still work.
I got past the blocks that appear when the logic functions. The backlight does not work so it is hard to see the printed message. I purchased a new LCD and will try it all with the new LCD soon.
My apologies - I did not realise the image was there (in part because attached images do not work properly on this forum).
The immediate question is that you have been told that you failed to connect the R/~W line on the module. Have you actually corrected that and tried again?
Your contrast appears to be more-or-less correct; your use of a white link for this is unfortunate in the photograph.
It is indeed puzzling that the backlight does not work as you do appear to have wired it correctly. My remaining concern is your soldering of the pin header to the LCD board - it does not look neat and it is possible that you have at least one "dry joint" - a "macro" view of your board with the soldering - perfectly focussed of course - and also of the reverse of the board, might just reveal an evident problem. Bad soldering has caught many "newbies" out.
It looks an excellent photo to me. All the wires are clearly shown. Connect the RW pin to 0V and everything should work. If only everyone thought of using short wires and different colours ...
Connect the RW pin to a GPIO pin and use an appropriate constructor (i.e. one with a RW argument). And you get read-write of your display.
My apologies - I did not realise the image was there (in part because attached images do not work properly on this forum).
They seem to work OK for me and I've got my browser set to block damn near everything. Have you tried a different browser at least temporarily to see if that's the problem.
The problem is in the intentionally obfuscated code as detailed in this discussion. It has nothing to do with the content blockers.
I use exclusively Firefox. On Windoze ("work" machines) it sort of works - most images come up in IrfanView having been downloaded to temp, I think some appear correctly in a new tab.
On Linux, different things happen on different machines; some images are downloaded to tmp and are offered to load with Image Viewer. Some are offered to download which may or may not actually proceed in different (machine) instances, else the process simply vanishes. So I take the link and give it an image tag in a reply. The whole image renders but compressed to fit the text band. Because the link is still obfuscated, "View Image" does not work, but Ctrl-plus can expand it to a degree as part of the page (unfortunately it also expands the nuisance blue header band).
As Chagrin explains, this is no fault of the browser or really of the configuration (as most other genuine sites operate just fine), it is deliberate bloody-mindedness on the part of the forum operators. I have made some attempts to fix the file associations but essentially gave up.
Didn't get a new LCD and used same one. Same code uploaded. New Uno. Added an XBee shield for the next project. 5 is grounded. Still get the blocks and nothing else. If there are no other suggestions, I am moving on.
If there are no other suggestions, I am moving on.
Suggestions:
Disconnect everything.
Fix the soldering.
Get rid of the XBee shield for now.
Re-connect everything neatly, with no crossed wires and no wires running directly under other similarly colored wires, much like your first photograph.