VEjam se o MAin funciona

Dependencies:   TextLCD mbed

main.cpp

Committer:
gianlucamgf
Date:
2018-05-10
Revision:
0:5661dfef7807
Child:
1:405e88f6e720

File content as of revision 0:5661dfef7807:

#include "mbed.h"
#include "TextLCD.h"
 
// Host PC Communication channels
Serial pc(USBTX, USBRX); // tx, rx
 
// I2C Communication
I2C i2c_lcd(D14,D15); // SDA, SCL
 
  
TextLCD_I2C lcd(&i2c_lcd, 0x7F, TextLCD::LCD20x4);  // I2C bus, PCF8574 Slaveaddress, LCD Type

 
int main() { 
    
// Show cursor as blinking character
    lcd.setCursor(TextLCD::CurOff_BlkOn);
    lcd.setBacklight(TextLCD::LightOn);
 
// Set and show user defined characters. A maximum of 8 UDCs are supported by the HD44780.
// They are defined by a 5x7 bitpattern. 
lcd.setAddress(5,2);
lcd.printf("salve");
wait_ms(2000);
lcd.cls();
lcd.setAddress(5,2);
lcd.printf("...");
wait_ms(2000); 
lcd.cls();
lcd.setAddress(5,2);
lcd.printf("seu otario");
 
}