Go Down

Topic: Characters dimmed (Read 1 time) previous topic - next topic

romycha1

I'm having a problem with certain characters being dim, to the point where I can hardly see them, while some characters are brightly lit up.  I'm still very new to the Arduino board and I'm trying to hook up a potentiometer and an LCD, and have the LCD show the value (0-1023) of the POT.  I was able to find the code to achieve this on this site, so that is not the problem.  The problem is, I want a description of the value next to it, but when it appears it is VERY dim compared to the POT value. 

Any help would be appreciated.

Here is my code :
Code: [Select]

#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

#define I2C_ADDR    0x3F
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7

int n = 1;
int sensorPin = A3;
int sensorValue = 0;

LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{
lcd.begin (20,4);
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
}

void loop()
{
lcd.setCursor(0,0);
lcd.print("LF");
sensorValue = analogRead(sensorPin);
delay(20);
lcd.clear();
lcd.setCursor(4,0);
lcd.print(sensorValue);
delay(50);
}

Grumpy_Mike

Sounds like you might have a hardware problem with the LCD's back light. This consists of a number of LEDs, one or more could be out. What resistor value did you put in series with them? Have they always been like that or did it work better at the start?

romycha1

No resistors are being used.  Just the board, a POT, and the LCD screen.
The thing is, no matter where I place the lcd.print("LF") on the screen, it is dim.  But the POT values are very brightly lit. 

romycha1

I real quickly loaded this sketch from this post, but I deleted the void loop

http://arduino.cc/forum/index.php/topic,128635.0.html

and all the characters show nice and bright... no problems at all....

romycha1

Ok, I reloaded the original code, but deleted everything after lcd.print("LF"), and the LF showed up nice and bright... Then I put in the rest of the loop, and same issue, the LF comes out dim.

John_S

If you clear and rewrite the display too often the characters appear dim.

It's better to only rewrite the information when it changes.
http://jsrintervalometers.blogspot.ca

romycha1

I see...
but I'm not reloading the same code over and over.  I'll change one thing here and there... but the only time it comes up brightly lit is if I delete everything after lcd.print("LF")

fm

If you remove the clear() from the code you posted it will be just fine. The  clear() is deleting the LCD so you only have 20ms worth of "LF" on each iteration of the loop.
   

romycha1

Ahh... Brilliant!
Thank you very much.  I had merged 2 different sketches to the one I posted, and I knew I had a few extras in there, but I wasn't sure what wasn't needed.  Thank you so much... Might've been something super simple to you, but it's been giving me a headache for the past few hours.

Go Up