Skip to content

YFROBOT-TM/pxt-YFRobot-iiclcd1602

Repository files navigation

YFROBOT MAKECODE Extensions OF IIC LCD1602 FOR MICRO:BIT

Use as Extension

This repository can be added as an extension in MakeCode.

Blocks preview

A rendered view of the blocks

Extension API

Example

YFRobotBit.connectLcd(39); YFRobotBit.showStringOnLcd1602("Hello world!", 0, 15); YFRobotBit.showStringOnLcd1602("Hello yfrobot!", 16, 15); YFRobotBit.setLcdBacklight(LcdBacklight.On); const pos1602: number = YFRobotBit.position1602(LcdPosition1602.P0); const isLcdConnected: boolean = YFRobotBit.isLcdConnected();

YFRobotBit 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.

YFRobotBit.showStringOnLcd1602("Hello world", 0, 15)

YFRobotBit clearLcd

Clears the LCD completely.

YFRobotBit.clearLcd()

YFRobotBit setLcdBacklight

Enables or disables the backlight of the LCD.

YFRobotBit.setLcdBacklight(LcdBacklight.On)

YFRobotBit connectLcd

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

YFRobotBit.connectLcd(39)

YFRobotBit isLcdConnected

Returns true if a LCD is connected. False otherwise.

YFRobotBit.isLcdConnected()

License

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

Metadata (used for search, rendering)

  • for PXT/microbit
YFRobotBit=github:YFROBOT-TM/pxt-YFRobot-iiclcd1602