Approved content

The content below is provided by a partner.

1010technologies/pxt-makerbit-lcd1602 1.8.10 GitHub

MakerBit LCD1602

Build Status


MakeCode extension for an I2C LCD 1602 displays.

MakerBit Board

The MakerBit connects to the BBC micro:bit to provide easy connections to a wide variety of sensors, actuators and other components, for example a LCD display.

MakerBit MakerBit+R
MakerBit MakerBit+R with motor controller


This extension supports printing text and numbers on an I2C LCD 1602 (2 x 16 characters) display. Displays with I2C address 39 or 63 will work automatically. Use connectLCD to explicitly connect to a different I2C address.


LCD Example

makerbit.showStringOnLcd1602("MakerBit", makerbit.position1602(LcdPosition1602.Pos1), 9)

MakerBit connectLcd

Connects to the LCD at a given I2C address. The addresses 39 (PCF8574) or 63 (PCF8574A) seem to be widely used.


MakerBit showStringOnLcd1602

Displays a text on a LCD1602 in the given position range. The text will be cropped if it is longer than the provided range. If there is space left, it will be filled with whitespaces.

makerbit.showStringOnLcd1602("Hello world", 1, 16)

MakerBit clearLcd1602

Clears the LCD completely on a LCD1602.


MakerBit setLcdBacklight

Enables or disables the backlight of the LCD.


MakerBit isLcdConnected

Returns true if a LCD is connected. False otherwise.


MakerBit lcdMakeCharacter

Create a custom LCD character using a 5x8 pixel matrix.

makerbit.lcdMakeCharacter(LcdChar.c1, image)

MakerBit lcdCharacterPixels

Returns a 5x8 pixel matrix for use as a custom character.

image = makerbit.lcdCharacterPixels()

MakerBit lcdShowCharacter1602

Display a custom character at a specified LCD position.

makerbit.lcdShowCharacter1602(LcdChar.c1, 1)


Licensed under the MIT License (MIT). See LICENSE file for more details.

Supported targets