// Test I2C LCD display on the STM32.
//
// Test for:
// https://github.com/wokwi/wokwi-features/issues/1001
//
// Based on the second example in the 'Docs':
// https://docs.wokwi.com/parts/board-st-nucleo-c031c6
// https://wokwi.com/projects/365421666018061313
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x27
#define LCD_COLUMNS 20
#define LCD_LINES 4
LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_LINES);
void setup()
{
Serial.begin(115200);
Serial.println("Test for the STM32 with I2C LCD display.");
Serial.print("SDA = pin ");
Serial.println(SDA);
Serial.print("SCL = pin ");
Serial.println(SCL);
Wire.begin();
lcd.init();
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("Hello, STM32");
}
void loop()
{
delay(10);
}
Loading
st-nucleo-c031c6
st-nucleo-c031c6
Watch the SCL turn low.