Hacking a BV4618 20×4 LCD (Part-3)

In Part-2 of this blog post series I provided a detailed ‘How-To’ for new users of theĀ  ByVac BV4618 LCD for their Arduino projects. It is clear to me there are plenty of Arduino hobbyists who want to hack LCD’s and need a simple way to wire them up and write to them.

The ByVac BV4618 LCD is a great choice. You can actually get it up and running with three wires – V+, Gnd, and Tx. Writing text to the display is pretty straightforward using the BV4618_S library. The library is useful, but Ol’ Sopwith does not think the class is easy enough to use for beginners.

To solve this problem I extended the BV4618_S class library and created a new class named sop4618_S. The class is brain-dead simple to use and it hides all the complexities of the VT100 code sequences.

The class has the following features:

  • Simple API for new programmers
  • Complete cursor management
  • Cursor X,Y positioning
  • LCD backlight control
  • Text centering functions
  • Uses the Arduino String class for efficiency
  • Clear method names
    • clearLCD()
    • centerString()
    • cursorXY(2, 10)
    • cursorShow(false)
    • printString(“Anybody seen Kilroy?”)
    • enableBacklight(true)
    • etc.

Included in the class library is a Demo sketch that shows how to use the class. You can see two screens of the demo program below.

There he is!The Arduino class library, demo program, and detailed documentation is included in the zip file. Click on the button below to download the library.


Special thanks to ByVac for designing such a cool gagdet.

Hack on!




3 thoughts on “Hacking a BV4618 20×4 LCD (Part-3)

  1. I cannot get this new version to compile using the “verify” in Arduino 1.6.7.
    I have not tried an older version of Arduino but suspect that the complier in this new version is much more strict than the older ones.
    I get dozens of error messages, many of which are due to failure to initialize or declare variables or functions.
    Is there a newer version of the hack? I am using sop4618_S-v0.5
    I have two of the 4X20 LCD’s which I want to use in a solar water heating
    system. Thanks in advance for your reply

    • Hi George,

      I will troubleshoot this issue and determine why it is not working under 1.6.7. Please give me a couple of days to figure this out.


      • I installed Arduio 1.6.8 and confirmed my demo program will not compile. After some research, I determined the problem is in the bv4618_S_lib library. To fix the problem, you need to edit the file bv4618_S.cpp located in the bv4618_S_lib folder.

        Open the file bv4618_S.cpp in an editor.
        On line 24 of this file you will see the include statement:
        #include “WProgram.h”

        This must be changed to:
        #include “Arduino.h”

        Save the file and compile my demo program. It should compile now. Note: You may see some compiler warnings about “const char * deprecated.” These can be safely ignored.


Leave a Reply

Your email address will not be published. Required fields are marked *