Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-STM32F103C8T6 TextLCD
main.cpp
- Committer:
- danilloaguiar
- Date:
- 2019-07-24
- Revision:
- 0:2f38376349e5
File content as of revision 0:2f38376349e5:
#include "stm32f103c8t6.h"
#include "mbed.h"
#include "TextLCD.h"
DigitalOut myled(PC_13);
// I2C Communication
I2C i2c_lcd(PB_9, PB_8); // SDA, SCL
TextLCD_I2C lcd(&i2c_lcd, 0x4E, TextLCD::LCD16x2, TextLCD::HD44780); // I2C bus, PCF8574 Slaveaddress, LCD Type, Device Type
int main()
{
lcd.setMode(TextLCD::DispOn); //DispOff, DispOn
lcd.setBacklight(TextLCD::LightOff);//LightOff, LightOn
lcd.setCursor(TextLCD::CurOff_BlkOff);//CurOff_BlkOff, CurOn_BlkOff, CurOff_BlkOn, CurOn_BlkOn
lcd.printf("123456789123456789");
}