display i2c krijg ik niet werkend

De programma's uploaden zonder fouten. ook de aansluitingen voor de I2C bus heb ik ook op alle mogelijke manieren geprobeerd.

Het programma wat ik gebuik is het example "hello World" hierin pas ik dan alleen het adres van m'n display aan. Zou moeten werken volgens deze site, youtube en google.

// --------------------------------------
// i2c_scanner
//
// Version 1
//    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.
// Version 2, Juni 2012, Using Arduino 1.0.1
//     Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26  2013
//    V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
//    by Arduino.cc user Krodal.
//    Changes by louarnold removed.
//    Scanning addresses changed from 0...127 to 1...119,
//    according to the i2c scanner by Nick Gammon
//    http://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
//    As version 4, but address scans now to 127.
//    A sensor seems to use address 120.
// 
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//

#include <Wire.h>


void setup()
{
  Wire.begin();

  Serial.begin(9600);
  Serial.println("\nI2C Scanner");
}


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

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

  nDevices = 0;
  for(address = 1; address < 127; address++ ) 
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the 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(5000);           // wait 5 seconds for next scan
}

laat deze maar in en kijk via de seriële monitor wat je ziet.
SCL aansluiten op A5
SDA aansluiten op A4

2C Scanner
Scanning...
I2C device found at address 0x27 !
done

Scanning...
I2C device found at address 0x27 !
done

zie ik dan in de serialmonitor

De kans bestaat dat je een verkeerde library in je programma gebruikt.
De meest gebruikte is die van fmalpartida, die vind je hier:
I2C library fmalpartida
links onderaan op downloads klikken en dan de standaard volgorde gebruiken om deze library te installeren.

De tweede mogelijkheid is dat je een afwijkend I2C interface-board hebt. Er zijn verschillende modellen in omloop die allemaal verschillend gedeclareerd moeten worden.
Hieronder is een universeel programma om voor iedere I2C interface te bepalen hoe die moet worden gedeclareerd.

Hopelijk kun je het engels lezen want er staan een paar waarschuwingen , over dat je het programma niet te lang moet gebruiken omdat je mogelijk je I2C interface of LCD display kunt beschadigen bij te lang gebruik.

char dummyvar; // dummy declaration for STUPID IDE!!!!
/*----------------------------------------------------------------------------
 * vi:ts=4
 *
 * i2cLCDguesser - guess i2c constructor for pcf8574 lcd backpack
 *
 * Created by Bill Perry 2013-04-16
 * Copyright 2013 - Under creative commons license 3.0:
 * Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
 * license page: http://creativecommons.org/licenses/by-nc-sa/3.0/
 * 
 *  This sketch attempts to locate a pcf8574 based hd44780 backpack
 *  and then tries to figure out the pin configuration for it by guessing....
 *
 *  NOTE/WARNING: Guessing is not really a good thing since 
 *  depending on the hardware design and wiring,
 *  it could actually damage the hardware. Use with caution!!!
 *  and do not leave things with an incorrect guess for too long.
 *  i.e. advance to the next guess as soon as possible.
 * 
 *  It requires using fm's LiquidCrystal library replacement:
 *  https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
 *
 *  For each guess it will re-initialize the display and
 *  write the constructor to the serial port.
 *  It will then attempt to blink the backlight 3 times.
 *  Finally it will attempt to write the constructor used to the LCD.
 *  When the correct configuration is guessed,
 *  the LCD will display the constructor
 *  and the backlight will be on.
 *
 * Since the guesser uses a limited number of known permutations,
 * it is possible that it will not be able to guess the needed
 * wiring.
 * 
 *  To use:
 *  1. install fm's library (it replaces the stock LiquidCrystal library)
 *  2. hookup the i2c backpack and only the i2c backpack to the Arduino
 *    (make sure to use the needed pullup resistors - 
 *      i2c needs them to work correctly)
 *  3. compile and upload the sketch
 *  4. go to the serial monitor in the IDE and set the baud rate to 9600 baud
 *  5. press the reset button on the arduino to start clean
 *  6. Press the <ENTER> key or [Send] button to advance to next guess
 *     NOTE: Make sure to select a newline as the line ending and
 *           if using the <ENTER> key you must first click on the text box
 *           to give it focus.
 *
 * Also note:
 * With respect to the the jumper on certain baords:
 * On the boards Ive seen so far, it controls the backlight control.
 * Depending on the board, it can
 * - force the backlight on
 * - force the backlight off
 * - allow backlight control by PCF8574
 *
 * So you may have to experiment with the jumper in/out to be able
 * to see anything on the display if you have a display that uses
 * light pixels on a dark background.
 *
 * Known Issue:
 * On chipkit platforms, with MPIDE mpide-0023-linux32-201311118-test
 * and earlier you must modify the twi.c file in
 * {installdir}/pic32/libraries/wire/utility/twic.
 * in the function twi_init()
 * Somthing in the clock stretching initalization causes the i2c module
 * to enter an infinite clock stretch and hang. A work around is to
 * change this:
 *----------------------------------------------------------------------
 * ptwi->ixCon.reg = (1 << _I2CCON_ON) | (1 << _I2CCON_STREN);
 *----------------------------------------------------------------------
 * to this:
 *----------------------------------------------------------------------
 * ptwi->ixCon.reg = 0; // disable then renable i2c module
 * ptwi->ixCon.reg = (1 << _I2CCON_ON) | (1 << _I2CCON_STREN);
 *----------------------------------------------------------------------
 *  Created April 2013
 *  Author: Bill Perry
 * 
 * History
 * 2014-01-09 bperrybap - changed i2c bus scan to avoid reserved space
 * 2013.11.26 bperrybap - added a version number
 * 2013.11.24 bperrybap - added multiple device detection (not allowed)
 * 2013.08.01 bperrybap - added chip type detection
 * 2013.04.16 bperrybap - Original creation
 *
 * @author Bill Perry - bperrybap@opensource.billsworld.billandterrie.com
 *----------------------------------------------------------------------------*/

In twee delen omdat het anders te groot is

#define VERSION 141 // major.minor.point 120 is 1.2.0
 
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Try to detect if fm's library is being used
// and bomb out with an error if missing known defines
// or if using defines that fm's library is known not to use
#if !defined(BACKLIGHT_OFF) || !defined(BACKLIGHT_ON) || !defined(FOUR_BITS) || defined(En) || defined(Rw) || defined(Rs)
#error i2dLCDguesser requires using fmalpartida LiquidCrystal replacement library
#endif

#define LCD_COLS 16
#define LCD_ROWS 2

// hide STUPID ugly 1.x Wire API change nonsense
#if ARDUINO < 100
#define write(_data) send(_data)
#define read() receive()
#endif

#define IICchip_UNKNOWN 0
#define IICchip_PCF8574 1
#define IICchip_MCP23008 2

#define DEFPROMPT ((const char *) 0)


const char *i2cWarning = \
"----------------------------------------------------------------\n"\
"NOTE/WARNING: Guessing the i2c constructor is not really a\n"\
"good thing since it could damage the hardware. Use with caution!\n"\
"Do not leave things with an incorrect guess for too long.\n"\
"i.e. advance to the next guess as soon as possible\n"\
"when the guess in incorrect.\n"\
"If the guess is correct, the constructor will show up\n"\
"on the LCD.\n"\
"----------------------------------------------------------------\n"\
;

int locatedevice(void);
int guessconfig(uint8_t address);
int IdentifyIOexp(uint8_t address);
const char *iicType2Name(int type);

void setup()
{
 Wire.begin();
 
#if ARDUINO >= 100
 while(!Serial); // wait for native USB devices to enumerate/attach
#endif

 Serial.begin(9600);
 Serial.print("i2cLCDguesser v");
 Serial.print(VERSION/100);
 Serial.print('.');
 Serial.print((VERSION%100)/10);
 Serial.print('.');
 Serial.println((VERSION%100)%10);

 Serial.println(" - Guess constructor for i2c LCD backpack");
 Serial.println(i2cWarning);
 waitinput(DEFPROMPT);
}
 
void loop()
{
int address;
int chiptype;

 address = locatedevice(); // go look for a i2c device
 if(address >= 0)
 {
 chiptype = IdentifyIOexp((uint8_t)address);

 Serial.print("Device found: ");
 Serial.println(iicType2Name(chiptype));
 
 /*
 * Check for PCF8574 chip
 */
 if(chiptype != IICchip_PCF8574)
 {
 Serial.println("Only supports PCF8574");
 }
 else
 {
 waitinput("<Press <ENTER> or click [Send] to start guessing>");
 /*
 * Got i2c address, and PCF8574 so now go start trying configurations
 */

 if( guessconfig((uint8_t) address))
 while(1); // user found config so halt
 }
 }
 delay(3000); // wait before looking again
}

/*
 * Returns address of first i2c device found, negative value if none found
 */

int locatedevice(void)
{
uint8_t error, address;
int rval = -1;
int devcount = 0;
 
 Serial.println("Scanning i2c bus for devices..");
 
 /*
 * Note: 
 * Addresses below 8 are reserved for special use
 * Addresses above 0x77 are reserved for special use
 */
 for(address = 8; address <= 0x77; address++ )
 {
 Wire.beginTransmission(address);
 error = Wire.endTransmission();
 if (error == 0)
 {
 devcount++;
 Serial.print("i2c device found at address 0x");
 if (address<16)
 Serial.print("0");
 Serial.println(address,HEX);
 rval = address;
 }
 else if (error==4)
 {
 Serial.print("Unknown error at address 0x");
 if (address<16)
 Serial.print("0");
 Serial.println(address,HEX);
 }   
 }
 if (rval < 0)
 Serial.println("No I2C device found");

 if (devcount > 1)
 {
 Serial.println("Warning: More than 1 device found");
 rval = -1; // for now we don't allow multiple devices on the bus
 }

 return(rval);
}

/*
 * Identify I2C device type.
 * Currently PCF8574 or MCP23008
 */

int IdentifyIOexp(uint8_t address)
{
uint8_t data;
int chiptype;

 /*
 * Identify PCF8574 vs MCP23008
 * It appears that on a PCF8574 that 1 bits turn on pullups and make the pin an input.
 * and 0 bits set the output pin to 0.
 * And a read always reads the port pins.
 *
 * Strategy:
 * - Try to Write 0xff to MCP23008 IODIR register (location 0)
 *  - Point MCP23008 to IODIR register (location 0)
 * - Read 1 byte
 *
 * On a MCP23008 the read will return 0xff because it will read the IODIR we just wrote
 * On a PCF8574 we should read a 0 since we last wrote zeros to all the PORT bits
 */

 /*
 * First try to write 0xff to MCP23008 IODIR
 * On a PCF8574 this will end up writing 0 and then ff to output port
 */
 Wire.beginTransmission(address);
 Wire.write((uint8_t) 0); // try to point to MCP23008 IODR
 Wire.write((uint8_t) 0xff); // try to write to MCP23008 IODR
 Wire.endTransmission();

 /*
 * Now try to point MCP23008 to IODIR for read
 * On a PCF8574 this will end up writing a 0 to the output port
 */

 Wire.beginTransmission(address);
 Wire.write((uint8_t) 0); // try to point to MCP23008 IODR
 Wire.endTransmission();

 /*
 * Now read a byte
 * On a MCP23008 we should read the 0xff we wrote to IODIR
 * On a PCF8574 we should read 0 since the output port was set to 0
 */
 Wire.requestFrom((int)address, 1);
 data = Wire.read();

 if(data == 0xff)
 {
 chiptype = IICchip_MCP23008;
 }
 else if (data == 0x00)
 {
 chiptype = IICchip_PCF8574;
 }
 else
 {
 chiptype = IICchip_UNKNOWN;
 }
 return(chiptype);
}
const char *iicType2Name(int type)
{
const char *name;
 switch(type)
 {
 case IICchip_PCF8574:
 name = "PCF8574";
 break;
 case IICchip_MCP23008:
 name = "MCP23008";
 break;
 default:
 name = "UNKNOWN";
 break;
 }
 return(name);
}

/*
 * Bit positions on i2c expander output port for LCD pins 
 */
typedef struct
{
 uint8_t en;
 uint8_t rw;
 uint8_t rs;
 uint8_t d4;
 uint8_t d5;
 uint8_t d6;
 uint8_t d7;
 uint8_t bl;
 __typeof__(POSITIVE) pol; // use typeof() for backward compability since polarity type name changed
} IICexpdata;



IICexpdata i2cparam[] = {
// EN, RW, RS, D4, D5, D6, D7, BL, POL
  { 2,  1,  0,  4,  5,  6,  7,  3, POSITIVE }, // YwRobot/DFRobot/SainSmart
  { 2,  1,  0,  4,  5,  6,  7,  3, NEGATIVE }, // Robot Arduino LCM1602/2004
  { 4,  5,  6,  0,  1,  2,  3,  7, NEGATIVE }, // MJKDZ board
  { 6,  5,  4,  0,  1,  2,  3,  7, NEGATIVE }, // I2CIO board modded for backlight (pnp transistor)
  { 6,  5,  4,  0,  1,  2,  3,  7, POSITIVE }, // I2CIO board modded for backlight (npn transistor)
  { 4,  5,  6,  0,  1,  2,  3,  7, POSITIVE }, // (extra combination of MJKDZ just in case...)
  {0xff} // end of guess table
};


int guessconfig(uint8_t address)
{
uint8_t guess = 0;
char buf[64];

 while(i2cparam[guess].en != 0xff)
 {

 Serial.print("Trying: ");

 sprintf(buf, "lcd(0x%02x, %d, %d, %d, %d, %d, %d, %d, %d, %s)",
 address,
 i2cparam[guess].en,
 i2cparam[guess].rw,
 i2cparam[guess].rs,
 i2cparam[guess].d4,
 i2cparam[guess].d5,
 i2cparam[guess].d6,
 i2cparam[guess].d7,
 i2cparam[guess].bl, i2cparam[guess].pol == POSITIVE ? "POSITIVE" : "NEGATIVE");
 Serial.println(buf);
 
 /*
 * initialize constructor with guess
 */
 LiquidCrystal_I2C lcd = LiquidCrystal_I2C(
 address,
 i2cparam[guess].en,
 i2cparam[guess].rw,
 i2cparam[guess].rs,
 i2cparam[guess].d4,
 i2cparam[guess].d5,
 i2cparam[guess].d6,
 i2cparam[guess].d7,
 i2cparam[guess].bl,
 i2cparam[guess].pol);

 lcd.begin(LCD_ROWS, LCD_COLS);

 /*
 * Quick 3 blinks of backlight
 */
 for(int i = 0; i< 3; i++)
 {
 lcd.backlight();
 delay(250);
 lcd.noBacklight();
 delay(250);
 }
 lcd.backlight();

 lcd.clear();
 sprintf(buf, "0x%02x,%d,%d,%d,%d,",
 address,
 i2cparam[guess].en,
 i2cparam[guess].rw,
 i2cparam[guess].rs,
 i2cparam[guess].d4);
 lcd.print(buf);

 sprintf(buf, "%d,%d,%d,%d,%s",
 i2cparam[guess].d5,
 i2cparam[guess].d6,
 i2cparam[guess].d7,
 i2cparam[guess].bl, i2cparam[guess].pol == POSITIVE ? "POSITIVE" : "NEGATIVE");
 lcd.setCursor(0, 1);
 lcd.print(buf);

 waitinput(DEFPROMPT);
 lcd.clear();
 guess++;
 }
 return(0);
}
#undef read // ugly but removes Wire libary function mapping done above
void waitinput(const char *prompt)
{
 if(prompt)
 Serial.print(prompt);
 else
 Serial.print("<Press <ENTER> or click [Send] to Continue>");

 while(Serial.available())
 Serial.read(); // swallow all input

 while(!Serial.available()){} // wait on serial input

 Serial.println();
}

Beste jitze.

Wanneer iemand je probeert te helpen en je vraagt om te laten zien wat je al hebt gedaan met je sketch, foto's en andere afbeeldingen, waarom negeer je die hulp dan ?
Je vertelt dan dat je alles goed gedaan hebt, maar je laat het niet zien.

Ik kan wel begrijpen dat het wat moeite kost om een (duidelijke) foto te maken en die dan hier te laten zien.
Maar je sketch kun je hier in een mum van tijd plaatsen.

Cartoonist haalt hier een heel goed punt aan; dat van de library van fmalpartida.
Dat zou meteen zichtbaar zijn als je je sketch geplaatst had.
De LCD guesser is ook een goede tip.
Die I2C printjes zien er allemaal nogal hetzelfde uit als je op het internet kijkt.
Bij nadere inspectie zul je zien dat er dan nog heel veel verschillende manieren zijn om de chip op dat printje te verbinden met het display.
Een heel duidelijke foto van het printje en/of vermelden waar je het printje vandaan hebt kan (maar hoeft niet) daar ook meer duidelijkheid over brengen.

Omdat de I2C kant wel maar op 1 manier kan worden aangesloten, zie je dus de communicatie tussen Arduino en chip wel, maar gaat er toch iets mis in de communicatie tussen chip en display.
Zit het I2C printje aan het display gesoldeerd ?
Je hebt 'm toch niet toevallig gewoon in elkaar geprikt zonder te solderen ?
Want in dat geval heb je zeer waarschijnlijk last van slechte verbindingen.

Hallo Cartoonist,
Eerst heb ik jou sketch erin geladen. toen kreeg ik de melding dat er fouten in de librarie zaten.
m'n oude libraries weggegooid van lcd, en de librarie van fmalpartida gedownload.
Hierna deze geinstalleerd, sketch weer geupload, dit gaat allemaal goed, alleen m'n lcd doet nog niets.
ik zie alleen het backlight heel licht knipperen.

Als ik m'n oude hello world erin wil zetten krijg ik ook weer foutmeldingen. maar als ik de standaard helloworld van arduino doe dan gaat dat wel, maar ook niets op het display alleen een knipperend backlight.

Je moet toch echt de , hello world, sketch die je hebt uitgeprobeert hier posten want er is geen standaard file voor LCD displays. (klik op het </> symbool en zet de sketch tussen de 2 code tags), dit is om te kunnen zien hoe je de library gebruikt en hoe je de 'constructor' hebt gemaakt.
Met een lege post of alleen de mededeling dat het niet werkt kan ik niet zo veel.

Bovendien schrijf je in je eerste post dat je drie LCD displays hebt, doen die alle drie hetzelfde ?
Als je een beschrijving/link of foto plaatst hoe je je display hebt aangesloten zou dat verhelderend werken. Volgens welk youtube filmpje heb je de LCD aangesloten?

Ook een link van welke I2C interface je hebt gebruikt kan hier verder helpen om jouw probleem op te lossen.

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>



#define BACKLIGHT_PIN     13

LiquidCrystal_I2C lcd(0x27);  // Set the LCD I2C address

//LiquidCrystal_I2C lcd(0x38, BACKLIGHT_PIN, POSITIVE);  // Set the LCD I2C address


// Creat a set of new characters
const uint8_t charBitmap[][8] = {
   { 0xc, 0x12, 0x12, 0xc, 0, 0, 0, 0 },
   { 0x6, 0x9, 0x9, 0x6, 0, 0, 0, 0 },
   { 0x0, 0x6, 0x9, 0x9, 0x6, 0, 0, 0x0 },
   { 0x0, 0xc, 0x12, 0x12, 0xc, 0, 0, 0x0 },
   { 0x0, 0x0, 0xc, 0x12, 0x12, 0xc, 0, 0x0 },
   { 0x0, 0x0, 0x6, 0x9, 0x9, 0x6, 0, 0x0 },
   { 0x0, 0x0, 0x0, 0x6, 0x9, 0x9, 0x6, 0x0 },
   { 0x0, 0x0, 0x0, 0xc, 0x12, 0x12, 0xc, 0x0 }
   
};

void setup()
{
   int charBitmapSize = (sizeof(charBitmap ) / sizeof (charBitmap[0]));

  // Switch on the backlight
  pinMode ( BACKLIGHT_PIN, OUTPUT );
  digitalWrite ( BACKLIGHT_PIN, HIGH );
  
  lcd.begin(16,2);               // initialize the lcd 

   for ( int i = 0; i < charBitmapSize; i++ )
   {
      lcd.createChar ( i, (uint8_t *)charBitmap[i] );
   }

  lcd.home ();                   // go home
  lcd.print("Hello, ARDUINO ");  
  lcd.setCursor ( 0, 1 );        // go to the next line
  lcd.print (" FORUM - fm   ");
  delay ( 1000 );
}

void loop()
{
   lcd.home ();
   // Do a little animation by writing to the same location
   for ( int i = 0; i < 2; i++ )
   {
      for ( int j = 0; j < 16; j++ )
      {
         lcd.print (char(random(7)));
      }
      lcd.setCursor ( 0, 1 );
   }
   delay (200);
}

een I2C interface is merkloos, die heb ik op hobbyelektronica gekocht.
de ander is van YwRobot Arduino LCM1602 IIC V1.
De derde kan ik zo niet vinden.

maak maar een paar fotos, wij zijn best goed in herkenning hoor.

foto's op dit forum zetten wil mij nog niet lukken. moet ik nog even uitvissen.

Dat kun je op deze manier doen:

Maak een paar scherpe foto's, waarop eventuele tekst leesbaar is en als de printsporen zichtbaar zijn, zal dat ook veel helpen.
Ga naar tinypic (klik hier).
Klik op de knop "bladeren".
Zoek de betreffende foto op op je pc, en klik op "openen".
Klik nu op "NU UPLOADEN !"
Beantwoord de beveiligingsvraag en klik nogmaals op "NU UPLOADEN !".
Je ziet nu een miniatuur van je foto, en links daarvan wat lichtgele veldjes.
Klik op de 2e van boven, waarbij staat "IMG-code voor forums & berichtenforums", deze tekst word nu geselecteerd.
Kopieer deze tekst (door op ctrl-c te drukken) .
Plak deze tekst vervolgens in het edit schermpje hier op het forum.

Das bijna alles.
Alleen nog even controleren of het goed gaat door op de "preview" toets te klikken.
Als het goed gaat, dan op "post" klikken en klaar is Klara.

Dit werkt zo bij alle forum software die ik tegen ben gekomen.
Je hoeft je dus niet te registreren daar, bemerkte ik onlangs.

Je probleem is dat je in de sketch 'hello world' de constructor voor de LCD verkeerd (of eigenlijk helemaal niet) hebt gedeclareerd.

Je gebruikt:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define BACKLIGHT_PIN     13

LiquidCrystal_I2C lcd(0x27);  // Set the LCD I2C address

//LiquidCrystal_I2C lcd(0x38, BACKLIGHT_PIN, POSITIVE);  // Set the LCD I2C address

Maar hje moet de volgende regel wijzigen:

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#define BACKLIGHT_PIN     13

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // for nameless iic
//LiquidCrystal_I2C lcd(0x38, BACKLIGHT_PIN, POSITIVE);  // Set the LCD I2C address

Je moet meegeven welke pinnen worden gebruikt, anders weet de library niet hoe je LCD is aangesloten op de I2C interface.

De constructor die ik hier heb gegeven werkt voor mij altijd , mogelijk moet je die veranderen als je een ander model I2C interface hebt.
Om dat uit te zoeken heb ik gisteren het programma LCD guesser hier gepost.

![](http://<img src=)">

na invoegen van de constructor regel brand het display wel constant, en na aanpassen van het contrast ook tekst.

jitze:
na invoegen van de constructor regel brand het display wel constant, en na aanpassen van het contrast ook tekst.

't Lijkt er dus op dat je probleem is opgelost.

Wat uitleg over de constructor
De initialisatie van een LCD doe je voor iedere library i.h.a. anders. Omdat je nu de fmalpartida library gebruikt moet je die initialiseren op de manier zoals deze library dit vereist.

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
LiquidCrystal_I2C lcd(address, En, Rw, Rs, d4, d5, d6, d7, bl, bl_polarity);

In de documentatie staat hierover: (o.a. in de file LiquidCrystal_I2C.h)

@param 1 lcd_Addr[in] I2C address of the IO expansion module.
@param 2 En[in] LCD En (Enable) pin connected to the IO extender module
@param 3 Rw[in] LCD Rw (Read/write) pin connected to the IO extender module
@param 4 Rs[in] LCD Rs (Reset) pin connected to the IO extender module
@param 5 d4[in] LCD data 0 pin map on IO extender module
@param 6 d5[in] LCD data 1 pin map on IO extender module
@param 7 d6[in] LCD data 2 pin map on IO extender module
@param 8 d7[in] LCD data 3 pin map on IO extender module
@param 9 bl[in] LCD backlight pin on IO extender module
@param 10 blpo backlight polarity

In deze volgorde kun je dus de 10 argumenten aanpassen naar behoefte.
@param 1: het I2C adress (8 voor PCF8574 en 8 voor de F versie mogelijk).
@param 2 t/m @param 9: De eigenlijke constructor die aangeeft hoe de 8 output poorten van de PCF8574 zijn verbonden met de LCD module, dit kan dus op vele manieren ingevuld worden.
@param 10: de polariteit voor de backlight

Het lijkt wat ingewikkeld in gebruik maar het grote voordeel van de fmalpartida library t.o.v. andere LCD libraries is dat deze library universeel toepasbaar en dat zal de reden zijn dat deze zo populair is.

Heel erg bedankt voor de informatie. Dit was zeer leerzaam.
Nu op naar de volgende uitdaging.
Ik wil nl een regelaar maken. waarmee ik met een potmeter een waarde kan instellen die vergelijk en dan uitgang sturen.
Dat lukt allemaal.
maar dan wil ik dat die uitgang niet langer dan bv. 10 seconden hoog blijft en dan weer afvalt.

Dat heeft erg weinig met dit onderwerp te maken zo te zien.
Het lijkt me verstandig daarover een nieuwe thread te starten.
Laat daarbij je sketch ook weer zien.
Als je in die sketch nog meer doet terwijl die 10 seconden wegtikken, dan moet je daarin geen delays hebben.
Sowieso is het gebruik van delay af te raden.
De geijkte methode om dat te doen, is te vinden in de "blink without delay" voorbeeld sketch.
Vandaar mijn handtekening hier.

Maar of dat je probleem zal oplossen is pas te zeggen als we meer van je project weten (de code zien dus).