Henrique Rosa / Mbed 2 deprecated I2C-LCD

Dependencies:   mbed TextLCD

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "TextLCD.h"
00003 //Incluye resistencias de 2.2K en los pines de i2c a 3.3
00004  
00005 
00006 
00007 // I2C Communication
00008 I2C i2c_lcd(D15,D14); // SDA, SCL
00009  
00010 TextLCD_I2C lcd(&i2c_lcd, 0x4E, TextLCD::LCD16x2, TextLCD::HD44780); // I2C bus, PCF8574 Slaveaddress, LCD Type, Device Type 
00011 
00012 
00013 int main() 
00014 {
00015 lcd.setMode(TextLCD::DispOn); //DispOff, DispOn
00016 lcd.setBacklight(TextLCD::LightOff);//LightOff, LightOn
00017 lcd.setCursor(TextLCD::CurOff_BlkOff);//CurOff_BlkOff, CurOn_BlkOff, CurOff_BlkOn, CurOn_BlkOn
00018 lcd.printf("HENRIQUE ROSA \n ");
00019  
00020  }