Pecunia_Insper
/
Main
VEjam se o MAin funciona
Diff: main.cpp
- Revision:
- 0:5661dfef7807
- Child:
- 1:405e88f6e720
diff -r 000000000000 -r 5661dfef7807 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 10 14:09:51 2018 +0000 @@ -0,0 +1,33 @@ +#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"); + +} \ No newline at end of file