library for 16x2

Working libraries, libraries being ported and related hardware
Post Reply
dev
Posts: 65
Joined: Sun Feb 19, 2017 8:41 am

library for 16x2

Post by dev » Tue Apr 18, 2017 1:52 am

Hi,
Do we have library for 16x2 lcd.
I searched the forum, but i found i2c based library. But i am using directly to port.


Nutsy
Posts: 241
Joined: Sun Jul 24, 2016 4:26 pm

Re: library for 16x2

Post by Nutsy » Tue Apr 18, 2017 1:00 pm

Yep Liquid Crystal and Liquid Crystal i2c depending on your display interface...
I dont think you need a specualy ported version, just works out the box i think...

dev
Posts: 65
Joined: Sun Feb 19, 2017 8:41 am

Re: library for 16x2

Post by dev » Fri Apr 21, 2017 2:54 am

Thanks,
This is how i wrote code, As per library. Is this code correct?

Code: Select all

#include <LiquidCrystal.h>

LiquidCrystal lcd(PB12,PB13,PA0,PA1,PA2,PA3);

void setup() {
  lcd.begin(16,2,1);
    // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}
Now preparing for hardware.

salwan
Posts: 4
Joined: Tue Jun 20, 2017 1:27 pm

Re: library for 16x2

Post by salwan » Sun Sep 10, 2017 1:25 pm

hi dev

did you get the answer of 2x16 lcd ? if yes can you help me i also have problem in same issue

csnol
Posts: 15
Joined: Thu Aug 24, 2017 12:57 pm

Re: library for 16x2

Post by csnol » Tue Sep 12, 2017 9:41 pm

Use

Code: Select all

  lcd.begin(16,2);

Post Reply