Hello world only on one line

I hooked up my LCD to my Arduino Uno, and did a sketch to print Hello on one line, and world! on another line. I can only get my LCD to print on one line. I thought initializing it with lcd.begin(16, 2); would do the trick. I can only get the LCD to print on one line. Below is the code I am using. Thanks!


#include <LiquidCrystal.h>
//*
   *LCD pins for RS,E,DB4,DB5,DB6,DB7
     Hooked to Arduino digital pins 4,5,6,7,8,9
//*
LiquidCrystal lcd(4,5,6,7,8,9);
void setup()
{
//*
  *The LCD has two rows of 16 characters each 
//*
  lcd.begin(16, 2);
  lcd.clear();
}
void loop()
{
  lcd.setCursor(0, 5);
  lcd.print("Hello");
  lcd.setCursor(1, 6);
  lcd.print("world!");
  delay(10000);
}

You have got the row and column parameters for setCursor() the wrong way round

and it does not compile.

The comment section that you use does not exist in C++

//*
  this is not comment in C++
//*

Fixed it for you:

I have it figured out. I used 0,0 and 0,1 and it worked. Hello was on first line and world! on the second line.
Yes, sorry about my comments being wrong. Being new, I am trying to figure out commenting. Thanks!

That's okay, don't hesitate to ask, we are here to help.

There is a newer and improved library.
I used your sketch with that newer library as well: https://wokwi.com/arduino/projects/322615051378754131

+1 for the hd44780 library.

Don't have to just use // to comment.

You can do this too

int someVariable = 0
/* This is also a comment
and works on multiple lines until the closing symbol like so...
*/
int someOtherVariable = 1;

lcd.setCursor(printPosition, linePosition); //linePosition: 0 for TopLine; 1 for BotLine