So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Verlique
#59801 Hi guys, I'm new here (and in the world of ESP kkk)
I'm from Brazil, so... please don't judge my BAD English.
I'm trying to make a basic thing... just connect the LCD display into a Esp, but is not working...

I'm using:
ESP8266 Nodemcu 1.0
LCD display 16x2 1602A v2.0
i2c FC-113
Arduino IDE

Connections:
GND > GND
VCC > 3v
SDA > D2
SCL > D1

I read a lot of guides in the internet and unfortunately my LCD display don't show any text... This is my "code" for test, the LED blink okay, but no text, just a blue light...
Code: Select all#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd (0x27,16,2);

void setup(){
  lcd.begin(16, 2);
  lcd.init();
  lcd.backlight();
  lcd.setCursor(1, 0);
  lcd.print("TEST");
  lcd.setCursor(1, 1);
  lcd.print("2TEST2");
  pinMode(2, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(2, LOW);
  delay(1000);   
  digitalWrite(2, HIGH);
}


Thanks for any help
You do not have the required permissions to view the files attached to this post.
User avatar
By picharras
#63951 Hi, i hope not be too late

Something similar happened to me. What you have to do is scan the i2c address on your board. With this code you can do it:

Code: Select all// credits: http://electronics.stackexchange.com/questions/76617/determining-i2c-address-without-datasheet

// i2c_scanner
 //
 // This program (or code that looks like it)
 // can be found in many places.
 // For example on the Arduino.cc forum.
 // The original author is not know.
 //
 // This sketch tests the standard 7-bit addresses
 // from 0 to 127. Devices with higher bit address
 // might not be seen properly.
 //
 // Adapted to be as simple as possible by Arduino.cc user Krodal

#include <Wire.h>

void setup()
{
    Wire.begin();
    Serial.begin(115200);
    Serial.println("\nI2C Scanner");
}

void loop()
{
    byte error, address;
    int nDevices;

    Serial.println("Scanning...");

    nDevices = 0;
    for(address = 0; address <= 127; address++ )
    {
        Wire.beginTransmission(address);
        error = Wire.endTransmission();
        if (error == 0)
        {
            Serial.print("I2C device found at address 0x");
            if (address<16)
                Serial.print("0");
            Serial.print(address, HEX);
            Serial.println(" !");
            nDevices++;
        }
        else if (error==4)
        {
            Serial.print("Unknow error at address 0x");
            if (address<16)
                Serial.print("0");
            Serial.println(address,HEX);
        }
    }
    if (nDevices == 0)
        Serial.println("No I2C devices found\n");
    else
        Serial.println("done\n");
    delay(30000);
 }


Then change
Code: Select allLiquidCrystal_I2C lcd(0x27, 20, 4);
with correct address.

In my case it was this way:
Code: Select allLiquidCrystal_I2C lcd(0x3F, 20, 4);