Problem with LIQUIDCRYSTAL LIBRARY print

Hi,
I am working on a project which uses cheap rf link modules to send keypresses from one arduino(mega2560)(4x4 matrix keypad) to another which is UNO and then displaying that on 16x2 LCD Via the LIQUIDCRYSTAL library.

I need to see subsequent keypresses on the screen. Now, I set the cursor to bottom right corner, turn on auto scroll . and print the data.
The probllem is one character gets printed but when the second character prints, the cursor moves to left and the data is printed,also the first printed letter gets deleted.

Code:
#include <VirtualWire.h>
#include<LiquidCrystal.h>
const int receiver_pin = 12;

LiquidCrystal lcd(6,7,8,9,10,11);
void setup()
{
   Serial.begin(9600);
   vw_set_rx_pin(receiver_pin);
   vw_setup(2000);
   vw_rx_start();
   lcd.begin(16,2);
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;
    lcd.setCursor(15,1);
    
    
    if(vw_get_message(buf, &buflen))
    {
       digitalWrite(13,HIGH);
       
       
     lcd.autoscroll();
for(int i=0;i<buflen;i++)
       {
         Serial.print((char)buf[i]); 
         lcd.print((char)buf[i]);
          delay(100);
       }
       digitalWrite(13,LOW);
       
       
    } 
}

This is the code

My motive is to print the characters one after the other.

Any Help on how this can be fixed?

Now, I set the cursor to bottom right corner, turn on auto scroll . and print the data. . . . My motive is to print the characters one after the other.

The normal operation of the display controller is the print the characters, one after the other, starting at the upper left. This will be OK for the first 16 characters.

After each 16 characters you will have to do some cursor positioning. I don't think that the auto scroll (which is really auto shift) will help you too much because after a while the 'old' characters will start to reappear on the screen.

Follow the [u]LCD Addressing[/u] link at http://web.alfredstate.edu/weimandn for more information on the display characteristics.

Don

Thanks!

The only thing I did to solve this is removing the setcursor and the autoscroll.
Now Works like a charm.

It was my first post.
Thank you very much

#include <VirtualWire.h>
#include<LiquidCrystal.h>
const int receiver_pin = 12;

LiquidCrystal lcd(6,7,8,9,10,11);
void setup()
{
   Serial.begin(9600);
   vw_set_rx_pin(receiver_pin);
   vw_setup(2000);
   vw_rx_start();
   lcd.begin(16,2);
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;
    //lcd.setCursor(15,1);
    
    
    if(vw_get_message(buf, &buflen))
    {
       digitalWrite(13,HIGH);
       
       
     // lcd.autoscroll();
//lcd.rightToLeft();
for(int i=0;i<buflen;i++)
       {
         Serial.print((char)buf[i]); 
         lcd.print((char)buf[i]);
          delay(100);
       }
       digitalWrite(13,LOW);
       
       
    } 
}