• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

https://github.com/johnrickman/LiquidCrystal_I2C

Q&A Forum › Category: Arduino › https://github.com/johnrickman/LiquidCrystal_I2C
0 Vote Up Vote Down
Daniel Voges asked 5 years ago

Has anyone used https://github.com/johnrickman/LiquidCrystal_I2C this LCD library with vscode and platformio and does it work, I get init() is private method?  I use it with the Arduino IDE and all is well is just with platform io and vscode, I am pretty sure I have my paths set up correctly. vscode is complaining about the private init() method.

Question Tags: LiquidCrystal_I2C
4 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Daniel.
How did you install the library?
Can you tell me the library ID or library name to include in the platfomIO.ini file, so that I can experiment? 
Regards,
Sara

0 Vote Up Vote Down
Daniel Voges answered 5 years ago

Hi Sara, I found the answer I just moved the init() method to the puplic section in the LiquidCrystal_I2C.h file. Here is the lcd library details:

/ —————————————————————————
// Created by Francisco Malpartida on 20/08/11.
// Copyright (C) – 2018
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License v3.0
//    along with this program.
//    If not, see <https://www.gnu.org/licenses/gpl-3.0.en.html&gt;.

0 Vote Up Vote Down
Steph answered 5 years ago

Hi Daniel,

I have the impression that you are confusing 2 distinct libraries. In your first post you refer to John Rickman’s one which was hosted on GitHub:

johnrickman/LiquidCrystal_I2C

And which is now hosted on GitLab under another name:

LCD_I2C

While in your 2nd post, it seems that you are actually using the New LiquidCrystal library, from Francesco Malpartida, which was hosted on Bitbucket:

New LiquidCrystal

But that is no longer the case since Bitbucket discontinued hosting Mercurial repositories.
An old version still seems to exist on GitHub, but it is no longer up to date since the latest available version displayed in PlatformIO is version 1.5, released a year ago.

In order for us to know exactly which library you are referring to, you would have to tell us exactly the name and identifier of the library in PlatformIO, as Sara asked you to do.

That of Francesco Malpartida bears the name LiquidCrystal and the identifier 136. Here is the PlatformIO reference:

https://platformio.org/lib/show/136/LiquidCrystal

Is this the one you are using?

If this is the one, I think you are not proceeding in the right way to initialize your instance. If its author has encapsulated the init() method of the LiquidCrystal_I2C class, he has a good reason to do so. You cannot use this interface to initialize your instance. Instead, take a look at the HelloWorld_i2C example provided by the library, which initializes the instance directly using the constructor of the class:

LiquidCrystal_I2C lcd(0x38); // Set the LCD I2C address

Then using the begin() method:

lcd.begin(16,2); // initialize the lcd

Regards,
Steph

0 Vote Up Vote Down
Daniel Voges answered 5 years ago

Hi Steph, thank you, I now know about platform io library id’s. I installed library id
576, LiquidCrystal_I2C by Frank de Brabander, Marco Schwartz, this did the trick thanks.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.