Good night, is too late for me after a lot of hour of work but id like to post this before go to in my bed ...
so I've the lcd Hitachi HD44780 and with the normal example stand alone it works without problems ...
I've issues when I put it into a scket where I use:
So, I didn't committed mistakes mentioned into the "Start Post" , do the fact I iniatilize the display ... with this:
LiquidCrystal lcd(2, 13, 0, 1, 9, 10);
void setup()
{
// set up the LCD's number of columns and rows:
pinMode(A0, INPUT);
lcd.begin(16, 2);
lcd.display();
lcd.println("Welcome");
delay(2000);
Serial.begin(9600); // Debugging only
// pinMode(ledPin, OUTPUT);
Serial.println("Program start");
// Initialise the IO and ISR
vw_setup(1200); // Bits per sec
vw_rx_start(); // Start the receiver PLL running
}
and then I push button on keypad the message goes on and when come back I print something on the display in this way:
lcd.display();
lcd.print("Dev 1 is ON");
lcd.noDisplay();
I've note that lcd.clear() doesn't work ... so due the fact the display seems like freeze ... Can you help thanks and good night ...
(1) You are using digital pins 0 and 1 for your LCD but they are also used by the serial monitor. You cannot change the serial monitor so you will have to use different pins for your LCD.
(2) There is no lcd.println() function. You won't blow up your Arduino, but you will get some funny characters on your display.
(3) lcd.clear() should work but it takes a relatively long time to complete so it is not a good idea to use it in loop().
I've correct with this lcd.println() function (sorry but I was too tired I was also read that into the first post but after I've tried everything ...
I've removed clear , What I can use in order to clean up the screen ? is enough Lcd.nodisplay() ?
I've modify the code in this way :
lcd.display();
lcd.print("Dev 1 is ON");
lcd.noDisplay();
This code is call in if option ... what is see is that ... the program pass for the if option do the fact execute also the "Serial.print" instruction that is after the lcd code but doesn't appear nothing ? How I can do ?
So, I've tried also just entry into the loop to put this ;
void loop()
{
lcd.display();
lcd.print("test 1");
lcd.noDisplay();
delay(1000);
// After the software do something is button is pressed ...
So, should be execute,but is see nothing ....
Thanks for your help,
Andrea
Your basic problem is based on your program structure.
lcd.display();
lcd.print("Dev 1 is ON");
lcd.noDisplay();
The first line turns the display on.
The second line writes information to the display.
The third line turns the display off.
Now after all of that what do you expect to see on the display? Hint: The display is turned off.
My advice is to get rid of all of the display on and display off instructions and see what happens.
I've removed clear , What I can use in order to clean up the screen ? is enough Lcd.nodisplay() ?
Lcd.nodisplay() will not do what you intend because the information that was previously displayed is still stored in the LCD controller memory. As soon as you do an lcd.display() the information will reappear on the screen.
In general all you have to do is overwrite your previous message with the new one. Here is an outline:
(1) Turn the device that you are controlling (not the LCD) on.
(2) Position the cursor to where you want the message to begin.
(3) Display the message "Device is ON" (Notice that there is an extra blank space before the word "ON")
(4) Do something else
(5) Turn the device off.
(6) Position the cursor back to the same position as in (2).
(7) Display the message "Device is OFF"
Another example:
In setup()
(1) Position the cursor
(2) Display the message "Temp is: "
In loop()
(1) Measure the temperature.
(2) Position the cursor
(3) Display several 'space' characters (enough to cover up the largest possible previous temperature value)
(4) Reposition the cursor
(5) Display the temperature
(6) do something else
(7) delay if 'something else' didn't take up too much time
Thanks I've tried to do what have you suggest and seems that work ... now Im not sure because I've the display that is half with all the pixel busy and the other half with pixel free. ... I think that is necessary and hardware reset ...
I've note one things when I've connected the display, I've seen that the virtual wire library work's bad that before ... so due the fact Im not able to reach the answer ... is possible ?
now Im not sure because I've the display that is half with all the pixel busy and the other half with pixel free.
If you are talking about the right and left halves of the display then you may have a problem with the display itself being bad.
If you are talking about the top and bottom halves of the display then your LCD is not being properly initialized. This is almost always due to improper connections and/or improper programming.
I suggest that you go back to the beginning and start again. Get the display working with a simple sketch such as the one below and then start implementing your other features, one at a time.
#include <LiquidCrystal.h>
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); // put your pin numbers here
void setup()
{
lcd.begin(16, 2); // this will work for all displays except some rare 16x1's
lcd.print("hello, world!");
lcd.setCursor(0,1)
lcd.print("it works!");
}
void loop()
{
}
Hi unfortunately is the left part of the display ... I've tried from zero like your suggestion but still, the left part broken ...
So, for the moment thanks a lots just when i'll got a new display i will try again,
I've understand the logical of the use ... in one of the last the result more or less was correct then Im quite sure that will be ok with another one.