Hi everyone my first post so please bear with me.
I have several 20x4 and 16x2 display units which all have the same problem.
Sketches compile and seem to upload OK ( according to the flashing leds but I can not get any output ( letters, numbers or characters _) I have tried uno / nano / mega and they all give the same result I have tried so many example sketches I have lost count.
This is the latest one tried :-
/*
This sketch will display a series of numbers 0-44 on a LCD screen 20x4 filling each line with consecutive numbers until it reaches
the end and then it starts again.
Code used for learning purposes developed by: www.HackerspaceLA.org | @hackerspacela
Code modified from Adafruit at: https://www.arduino.cc/en/Tutorial/LiquidCrystalAutoscroll
This example code is in the public domain: http://www.arduino.cc/en/Tutorial/LiquidCrystalAutoscroll
*/
// include the library code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//#define pins:
#define I2C_ADDR 0x27 // LCD address (make sure you run the I2C scanner to verify our LCD address)
#define Rs_pin 0 // Assign pins between I2C and LCD
#define Rw_pin 1
#define En_pin 2
#define BACKLIGHT_PIN 3
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
// initialize the library with the numbers of the interface pins
void setup() {
// set up backlight and turn on module:
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
// set up the LCD's number of columns and rows:
lcd.begin(20, 4); //My LCD is 20x4
}
void loop() {
// set the cursor to (0, 0) on line #1
lcd.setCursor (0, 0);
//lcd.autoscroll();
// print from 0 to 14:
for (int thisChar = 0; thisChar < 15; thisChar++) {
lcd.print(thisChar);
lcd.leftToRight();
delay(500);
}
// set the cursor to (0, 1) on line #2
lcd.setCursor (0, 1);
// set the display to automatically scroll:
//lcd.autoscroll();
// print from 0 to 14:
for (int thisChar = 15; thisChar < 25; thisChar++) {
lcd.print(thisChar);
delay(500);
}
// set the cursor to (0, 1) on line #3
lcd.setCursor (0, 2);
// set the display to automatically scroll:
//lcd.autoscroll();
// print from 0 to 14:
for (int thisChar = 25; thisChar < 35; thisChar++) {
lcd.print(thisChar);
delay(500);
}
// set the cursor to (0, 1) on line #4
lcd.setCursor (0, 3);
// set the display to automatically scroll:
//lcd.autoscroll();
// print from 0 to 14:
for (int thisChar = 35; thisChar < 45; thisChar++) {
lcd.print(thisChar);
delay(500);
}
// turn off automatic scrolling
lcd.noAutoscroll();
// clear screen for the next loop:
lcd.clear();
}
I would appreciate if anyone could point me in the correct direction as in this case google is NOT my friend/
thanks in advance
Keith