LCD i2c lcm1602 ywrobot

Vi prego qualcuno che mi aiuti, sono 3 ore che cerco su internet ed ormai i neuroni mi sono finiti, mi compare l'errore:

Opzioni di compilazione cambiate, ricompilo tutto
LDC_16x2_ic2:6: error: 'POSITIVE' was not declared in this scope
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
[u] [1]
exit status 1
'POSITIVE' was not declared in this scope

#include <Wire.h>  
#include <LiquidCrystal_I2C.h> // Using version 1.2.1
 
// The LCD constructor - address shown is 0x27 - may or may not be correct for yours
// Also based on YWRobot LCM1602 IIC V1
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  

void setup()
{
  lcd.begin(16,2); // sixteen characters across - 2 lines
  lcd.backlight();
  // first character - 1st line
  lcd.setCursor(0,0);
  lcd.print("Hello World!");
  // 8th character - 2nd line 
  lcd.setCursor(8,1);
  lcd.print("-------");
}
 
 
void loop()
{
}

  1. /u ↩︎

Perche' usi una libreria diversa da quella che richiede lo sketch

https://arduino-info.wikispaces.com/LCD-Blue-I2C

Ho cambiato la libreria come fatto anche ieri, ma mi dà sempre errori diversi tipo questo:

In file included from C:\Program Files (x86)\Arduino\libraries\NewliquidCrystal/LiquidCrystal_I2C.h:35:0,

from C:\Users\utente\Desktop\Progetti\LDC_16x2_ic2\LDC_16x2_ic2.ino:6:

C:\Program Files (x86)\Arduino\libraries\NewliquidCrystal/LCD.h:89:40: warning: unused parameter 'uSec' [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

^

C:\Program Files (x86)\Arduino\libraries\NewliquidCrystal/LCD.h:486:43: warning: unused parameter 'value' [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

^

C:\Program Files (x86)\Arduino\libraries\NewliquidCrystal/LCD.h:486:64: warning: unused parameter 'pol' [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

^

C:\Program Files (x86)\Arduino\libraries\NewliquidCrystal/LCD.h:505:40: warning: unused parameter 'value' [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

^

Quelli sono warning, non errori, puoi andare avanti tranquillamente.

Perfetto funziona, grazie mille per le dritte :smiley: