test

Dependencies:   mbed TextLCD

Committer:
beyondsoftware
Date:
Tue Aug 04 10:10:21 2020 +0000
Revision:
1:df10d37c417d
Parent:
0:376d7a150177
sss

Who changed what in which revision?

UserRevisionLine numberNew contents of line
oscarvzfz 0:376d7a150177 1 #include "mbed.h"
oscarvzfz 0:376d7a150177 2 #include "TextLCD.h"
oscarvzfz 0:376d7a150177 3 //Incluye resistencias de 2.2K en los pines de i2c a 3.3
oscarvzfz 0:376d7a150177 4
oscarvzfz 0:376d7a150177 5
oscarvzfz 0:376d7a150177 6
oscarvzfz 0:376d7a150177 7 // I2C Communication
beyondsoftware 1:df10d37c417d 8 I2C i2c_lcd(p3,p5); // SDA, SCL
oscarvzfz 0:376d7a150177 9
oscarvzfz 0:376d7a150177 10 TextLCD_I2C lcd(&i2c_lcd, 0x4E, TextLCD::LCD16x2, TextLCD::HD44780); // I2C bus, PCF8574 Slaveaddress, LCD Type, Device Type
oscarvzfz 0:376d7a150177 11
oscarvzfz 0:376d7a150177 12
oscarvzfz 0:376d7a150177 13 int main()
oscarvzfz 0:376d7a150177 14 {
oscarvzfz 0:376d7a150177 15 lcd.setMode(TextLCD::DispOn); //DispOff, DispOn
oscarvzfz 0:376d7a150177 16 lcd.setBacklight(TextLCD::LightOff);//LightOff, LightOn
oscarvzfz 0:376d7a150177 17 lcd.setCursor(TextLCD::CurOff_BlkOff);//CurOff_BlkOff, CurOn_BlkOff, CurOff_BlkOn, CurOn_BlkOn
oscarvzfz 0:376d7a150177 18 lcd.printf("Oscar de Jesus \n Vasquez");
oscarvzfz 0:376d7a150177 19
oscarvzfz 0:376d7a150177 20 }