This library is designed to work with LCD screens on the I2C bus. This library is an import of arduino library LiquidCrystal_I2C. This library was tested on the Nucleo F103 debug card using the LCD module 1602A.
Dependents: mbed-os-example-mbed6-wifi_MY_SOCKET_rigtech_copy_
main.cpp
- Committer:
- Yar
- Date:
- 2017-05-19
- Revision:
- 0:824096cc05af
File content as of revision 0:824096cc05af:
#include "mbed.h" #include <LiquidCrystal_I2C.h> // Set the LCD address to 0x27 for a 16 chars and 2 line display LiquidCrystal_I2C lcd(0x4E, 16, 2); int main() { // initialize the LCD lcd.begin(); // Turn on the blacklight and print a message. lcd.backlight(); lcd.print("Hello, world!"); while (1) { /* // Read temperature register data_write[0] = LM75_REG_TEMP; i2c.write(LM75_ADDR, data_write, 1, 1); // no stop i2c.stop(); wait(0.01); i2c.read(LM75_ADDR, data_read, 2, 0); i2c.stop(); */ wait(0.01); } }