This is a wrapper for this open source project: https://github.com/marcoschwartz/LiquidCrystal_I2C
It supports DFRobot I2C LCD displays.
It supports DFRobot I2C LCD displays.
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public Serial1 As Serial
Private lcd As LiquidCrystal_I2C
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
lcd.Initialize(0x3F, 16, 2) 'based on the example from the project.
lcd.Backlight = True
lcd.Write("test")
End Sub
Can you help me to connect my lcd to board?0x3f is the address of the screen I have. I'm using a proto board that had i2c pins built in I will try to find what pins they corelate too
Thanks, Yes! this is with lcd and I have 4pinYa sure, you have an i2c controller right? Did it come with the LCD ? Or do you just have an LCD screen?
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
// Define I2C Address where the PCF8574* is
#define I2C_ADDR 0x3F
// Define LCD Pins
#define BACKLIGHT_PIN 3
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
// Initialize LiquadCrystal with pin setup
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
void setup()
{
// Setup for LCD width and lines
lcd.begin (16,2);
// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
// Reset cursor to home
lcd.home ();
// Print Hello World
lcd.print("hello");
//lcd.setCursor(0, 2);
//lcd.print("world");
//delay(1000);
//lcd.clear();
// Print Hello World
}
void loop()
{
for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(150);
}
}