Pages: [1]   Go Down
Author Topic: Characters dimmed  (Read 1055 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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);
}
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31416
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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....
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Canada
Offline Offline
Sr. Member
****
Karma: 0
Posts: 318
Sometimes teaching, always learning,
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

It's better to only rewrite the information when it changes.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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")
Logged

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 37
Posts: 2172
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

   

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: