My LCD 1602 display codes wont upload

I used to be able to upload a code to my arduino board with I2C interference but it no longer seems to work as i always get an error message. I am using an Arduino UNO with the web editor, my OS is Windows 10 64 bit.

This is my code :

// LiquidCrystal - Version: Latest
#include <LiquidCrystal.h>

#include <LiquidCrystal_I2C.h>
//i2c pins
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); //

void setup()
{
//WE define our LCD 16 columns and 2 rows
lcd.begin(16,2);
//lcd.backlight();//Power on the back light

}

void loop()
{
//Write your text:
lcd.setCursor(0,0); //we start writing from the first row first column
lcd.print(" ELECTRONOOBS"); //16 characters poer line
delay(1000);//Delay used to give a dinamic effect
lcd.setCursor(0,1);
lcd.print("Thanks, share");
delay(8000);
lcd.backlight();
lcd.clear();//Clean the screen
lcd.setCursor(0,0);
lcd.print(" I MADE IT!!!!");
lcd.setCursor(0,1);
lcd.print(" ELECTRONOOBS");
delay(8000);
}

And this is the error message i am getting :

fatal error: ../Wire/Wire.h: No such file or directory

I tried other codes as well but i always an error message. I never got any errors with this code a few months ago, is the reason why this is happening because the library has been updated? If so, how do i find and use the older library in the online editor? It has taken me some hours of trooubleshooting but i haven't found anything that works. I am not very experienced with arduino.

Thank you for taking your time.

Creations:
This is my code :

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please take the time to properly format your code (including indentation!!!) before posting it. With the regular Arduino IDE that's as easy as Tools > Auto Format but unfortunately the Arduino Web Editor doesn't have this useful feature so you need to do it manually.

Creations:
// LiquidCrystal - Version: Latest
#include <LiquidCrystal.h>

#include <LiquidCrystal_I2C.h>

Very unlikely you need both those lines. They are for two different types of LCD modules.

Creations:
And this is the error message i am getting :

fatal error: ../Wire/Wire.h: No such file or directory

That means the library you're using is a piece of garbage.

Creations:
I used to be able to upload a code to my arduino board withI never got any errors with this code a few months ago, is the reason why this is happening because the library has been updated?

I don't get that error (I get a different one) so this tells me it happened because YOU imported the garbage library. So remove the library you imported.

Thank you so much for trying to help me, sorry about the formatting first time posting anything here.

I removed the library and now i get the error message:

'POSITIVE' was not declared in this scope

Again, here is the code ( Formatted it right this time, sorry about last time )

#include <LiquidCrystal_I2C.h>
//i2c pins
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // 

void setup() 
{
//WE define our LCD 16 columns and 2 rows
lcd.begin(16,2);
//lcd.backlight();//Power on the back light

}

void loop() 
{
//Write your text:
lcd.setCursor(0,0); //we start writing from the first row first column
lcd.print(" ELECTRONOOBS"); //16 characters poer line
delay(1000);//Delay used to give a dinamic effect
lcd.setCursor(0,1);
lcd.print("Thanks, share");
delay(8000); 
lcd.backlight();

lcd.clear();//Clean the screen
lcd.setCursor(0,0); 
lcd.print(" I MADE IT!!!!");
lcd.setCursor(0,1);
lcd.print(" ELECTRONOOBS");
delay(8000); 
}

Also, is it better to use the editor that you download instead of the online one?

Thank you for helping me

Creations:
I removed the library and now i get the error message:

'POSITIVE' was not declared in this scope

That's the same one I get so this is progress. The problem is there are multiple libraries named LiquidCrystal_I2C with different APIs. The version of the library being used by the Arduino Web Editor is different from the one your code is written for, thus the error.

You have a couple options to fix this:
Change your code to be compatible with the library being used in the Arduino Web Editor.
There is no actual documentation for this library but you can use the example sketches as a reference:

  • Click on the "Libraries" tab
  • Click "Library Manager"
  • In the "Search Library" box, type "liquidcrystal i2c".
  • If the star next to "LiquidCrystal I2C A library for I2C LCD displays" is white, click on it.
  • Click "Done"
  • Click the "Favorites" tab
  • Click on "Examples" button under "LiquidCrystal I2C"

You can also examine the source code here: GitHub - johnrickman/LiquidCrystal_I2C: LiquidCrystal Arduino library for the DFRobot I2C LCD displays

Make the Arduino Web Editor use the library the code is written for:
I suspect the problematic custom library you imported is the "POSITIVE" version of LiquidCrystal_I2C your code was written for. You can fix the bug in that library by opening the source file(s) that contain the line:

#include "../Wire/Wire.h"

and changing it to:

#include <Wire.h>

Then import the fixed library back to Arduino Web Editor.

Creations:
Again, here is the code ( Formatted it right this time, sorry about last time )

Code tags are nice but you still didn't indent it.

Creations:
Also, is it better to use the editor that you download instead of the online one?

My advice is if you can use the real Arduino IDE then you should definitely do so. Reasons I don't like Arduino Web Editor:

  • You have no control over it. You can't decide which libraries are installed. You can't decide which version to use. If the Arduino developers roll out some buggy code then you're screwed until they get around to fixing it. There have been releases of the Arduino IDE with serious bugs too but you always have the option of installing a previous version that doesn't have the bug.
  • The user interface is unnecessarily different from the normal Arduino IDE. The huge amount of existing information on the Internet for the Arduino IDE does not apply well to the Arduino Web Editor. To help people on the Arduino forum I now need to custom tailor my instructions depending on whether they're using the regular Arduino IDE or the web editor.
  • No Auto Format tool. This is an essential tool.
  • No support for 3rd party hardware packages. Do you want to use an ESP8266, ESP32, ATmega1284P, ATmega328PB, etc? You're screwed.
  • Hard to do version control or backups on your code. As you progress to more complex projects these things are essential but they will be a huge struggle with the Arduino Web Editor.
  • "The Cloud"

The Arduino Web Editor will be a nightmare The Arduino Web Editor is a reasonable alternative if for some reason you absolutely can't use the real Arduino IDE. That is the only time I'd consider using that thing.

Thank you so much, your post was really detailed and it helped me a lot! I hope people with the same problems find this useful.