Web Editor issue: Cannot DELETE Library

My software uses the IRremote Library to run a handheld infrared remote controller. The IRremote Library has a header (IRremote.h) that conflicts with one of the built-in Arduino Libraries, Robot IR Remote. This is not a problem when running sketches in the IDE, because all you have to do is delete the unwanted Robot IR Remote library, which eliminates the conflict. But when using the WEB Editor interface, there seems to be no way to delete the unwanted library! Is there any way to delete it, or alternatively, to give preference to the compiler to use the IR Remote Library, and NOT use the Robot IR library? My programs won't compile and run until I can get past this issue. HELP, someone!

Can you not rename the correct lib files to another name and call it from that name ? Of course you would also have to set any dependencies too.

You might have to delete it from Create first and upload it again ?

The problem, I believe, stems from the “#include (”#include IRremote.h"), not the name of the Library. The IR library is quite large and has many inter dependencies, and I did not write it. I have no idea at all how to eliminate the many potential conflicts. I just want to DELETE the Robot IR Library. Very few people use this now-obsolete robot toy. But MANY MANY people use Ken Sherifs’ library for parsing codes from an infrared controller, or for sending IR codes! We need a fix or workaround.

Please post your code using code tags(</> button on the toolbar) or share your sketch on Create. Also state which board you’re compiling for.

I just did a simple test in Create Editor(compiled for Uno):

#include <IRremote.h>
void setup() {}
void loop() {}

and the correct library was used:

Multiple libraries were found for "IRremote.h"
Used: /home/admin/builder/arduino-builder/latest/IRremote-2.0.1
Not used: /home/admin/builder/arduino-builder/latest/Robot IR Remote-1.0.2

Did you do a custom upload of the IRremote library?

Create Editor uses this way of understanding which library to use:

First of all it gives precedence to custom libraries.
Then it gives precedence to libraries that were included from the library manager with a specific version (not latest)
Then it chooses a library from all the other libraries that share the import (it’s not deterministic, though)

So to avoid conflicts there are two ways: upload a custom version of the library you want to use, or select a specific version of the library you want to use.

So, get the library you want to use in .Zip format and import it in the library panel (see attachment).
The library will end up in the Custom tab of your Library Panel, and will always be given precedence.

We will also work on a better solution UI-wise.

Thanks!

Screenshot 2016-11-21 10.19.52.png

Hey

experiencing the same problem here and not capable to set the dependecies at all…
I want to use the webeditor for controlling a LCD-display…

Downloaded a LiquidCrystal_2IC zip-file and uploaded it in my custom libraries of the webeditor…

Code works on chrystaldisplay if installed in my desktopversion IDE, but refuses to work in the webeditor where I installed the same zipfile…

Anyone any help on this topic?

Thanks in advance…

svanovertvelt: but refuses to work in the webeditor

We need an exact description of what "refuses to work" means.

There are at least 4 i2c libs for lcd’s available via CREATE and library manager.

Some libs are not fully compliant with CREATE but will work on the desktop.
Usually its a folder depth issue or the lib may contain files that are not used / foreign to create.

Strip out any unused portions and make a new ZIP.

Adding some documentation that may be of use.

Also if you could add a link to where you got the lib that would be great.

Importing sketches and libraries.pdf (285 KB)

I can’t even get this to compile:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
void setup() {}
void loop() {}

Wire and liquidC just hate each other?

I uploaded custom libraries for each, but then it won’t use the custom:
Multiple libraries were found for “Wire.h”

Used: /home/admin/builder/opt/cores/arduino/avr/libraries/Wire

Not used: /tmp/969366247/custom/wire

Help.

@Xaidin

Wire has been included for a while now by another means. Try comment it out and see if it compiles please.

Is that a custom lib for display you are trying to use ? If so wonder if its an older one.

Thanks for the reply ballscrewbob,
No luck with my compile. See errors and code below.

This code used to work fine about a year ago.

Errors (just a few of many):

/tmp/779172808/build/libraries/jm_wire-1-0-1/jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::available()'

/tmp/779172808/build/libraries/Wire/Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

/tmp/779172808/build/libraries/jm_wire-1-0-1/jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBufferLength'

Program Code (this is an altitude logger for a model rocket):

//#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085_U.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <SD.h>


/* 
   
   Connections
   ===========
   Connect SCL to analog 5
   Connect SDA to analog 4
   Connect VDD to 3.3V DC
   Connect GROUND to common ground
    
  LCD - default pins
   
   --
   SD Card:  SPI 
   CS-  10
   SCK- 13
   MOSI-11
   MISO-12
   
   
   */
   
Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);
#define I2C_ADDR    0x27 // <<----- Add your address here.  Find it from I2C Scanner
#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

LiquidCrystal_I2C	lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

const int buzzer = 2; //buzzer to arduino pin 2

void displaySensorDetails(void)
{
  sensor_t sensor;
  bmp.getSensor(&sensor);

  
  delay(500);
}

void setup() 
{
    pinMode(buzzer, OUTPUT); // Set buzzer - pin 2 as an output
if (!SD.begin(10)) {
    return;
  }

    File dataFile = SD.open("datalog.txt", FILE_WRITE);
    dataFile.println("Here's the Float of some Altitude.  A LOT OF it...");
    dataFile.println("Millis,altitude,temperature");
    dataFile.close();
  


  lcd.begin(20, 4);
  // Print a message to the LCD.
  lcd.print("Jason's Altitude");
  lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
  lcd.setBacklight(HIGH);
  lcd.home ();

/* Initialise the sensor */
if(!bmp.begin())
 
{
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("BAD NO BMP085!!");
   
 while(1);
  
  void clear ();
  


}
  }

float dog=0;
float tempsave=0;
int time=0;

void loop() 
{
  /* Get a new sensor event */ 
  sensors_event_t event;
  bmp.getEvent(&event);
 
  if (event.pressure)
  {
    float temperature;
    bmp.getTemperature(&temperature);

    float seaLevelPressure = 1017.61;  // in milibar

tempsave=temperature;
  
 float frack,frack2;

  frack=pow(event.pressure/1018.63,.190284);
  frack2= (1-frack)*145366.45;
  lcd.setCursor(3,1);
  
  lcd.print(frack2);

  lcd.setCursor(12,1);
  lcd.print("ft.");
  dog=frack2;
  
  
  lcd.setCursor(0,2);
  lcd.print("Temp=");
  lcd.setCursor(6,2);
  lcd.print(temperature);
  lcd.setCursor(11,2);
  lcd.print("*C");
  
  
  
  lcd.setCursor(3,3);
  lcd.print(millis());
  
  
  }
  
  time=(millis()/1000);
  
  File dataFile = SD.open("datalog.txt", FILE_WRITE);
    dataFile.print(time);
    dataFile.print(","); 
    dataFile.print(dog);
    dataFile.print(",");
    dataFile.println(tempsave);
    dataFile.close();
    
  
  
  tone(buzzer, 300); // Send xxkhz sound signal...
  delay(250);
}

Xaidin -

Did you ever find a solution for your compile error? I've discovered the same issue when trying to incorporate jm_Wire as a substitute for the crash/freeze prone Wire.h library. It appears that Arduino is trying to use both libraries during the code compile which share the same definitions. I've scoured my code and can find no location that includes wire.h. Please update if you've found a solution. Thanks.

I did find a solution to the compile error you observed. My initial assessment was correct in that the code is finding multiple sources (libraries) for certain definitions. You can NOT use both Wire.h library and jm_Wire.h library at the same time since they contain identical definitions. In my case, I had buried code which included the Wire.h library. I was only able to locate the source once I compiled with "Verbose output during complication". You will find this feature in the File > Preferences > Settings location of the Arduino IDE. Delete/rename/remove the extra library in conflict and your code should compile without issue.

Karma for follow up SawKyrom.