This repository can be added as an extension in MakeCode.
- open micro:bit_makecode
- click on New Project
- click on Extensions under the gearwheel menu
- search for https://github.com/YFROBOT-TM/pxt-YFRobot-iiclcd1602 and import
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();
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)
Clears the LCD completely.
YFRobotBit.clearLcd()
Enables or disables the backlight of the LCD.
YFRobotBit.setLcdBacklight(LcdBacklight.On)
Connects to the LCD at a given I2C address. The addresses 39 (PCF8574) or 63 (PCF8574A) seem to be widely used.
YFRobotBit.connectLcd(39)
Returns true if a LCD is connected. False otherwise.
YFRobotBit.isLcdConnected()
Licensed under the MIT License (MIT). See LICENSE file for more details.
- for PXT/microbit
YFRobotBit=github:YFROBOT-TM/pxt-YFRobot-iiclcd1602