Cannot download from Library manager

Hi.

I installed a Arduino UNO project, connected it to the power, and started it up, everything worked except my LCD 16,2 (I2C) it all worked smoothly on my test bench. So i removed the Uno back onto my test bench, and now i have another problem, when i re run the working sketch, i get an "error compiling for arduino/genuine uno"

I was under the impression this was caused by multiple wire.h libraries, so i deleted the wire.h from my own libraries in my Arduino folder. then i tried to re load wire.h from the Library manager, now i get another error message "error downloading http://downloads.arduino.cc/index.json"

Can anyone help me out here?

Arduino: 1.8.7 (Windows 7), Board: "Arduino/Genuino Uno"



compilation terminated.

Using library WireUtility-master at version 1.0.0 in folder: C:\Users\dell\Documents\Arduino\libraries\WireUtility-master 
Using library DHT-sensor-library-master at version 1.3.4 in folder: C:\Users\dell\Documents\Arduino\libraries\DHT-sensor-library-master 
Using library LiquidCrystal in folder: C:\Users\dell\Documents\Arduino\libraries\LiquidCrystal (legacy)
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\arduino-1.8.7\hardware\arduino\avr\libraries\Wire 
Using library Adafruit_Sensor-master at version 1.0.3 in folder: C:\Users\dell\Documents\Arduino\libraries\Adafruit_Sensor-master 
exit status 1
Error compiling for board Arduino/Genuino Uno.

Please post your code

Isn’t the Wire library a core library?

Hi.

Here is my sketch, and yes i believe wire.h is a core library.

//Libraries

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

//Constants

#define DHTPIN 11     // what pin my sensor is connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302)
#define fan 10  // what pin fan relay is connected to

int maxHum = 49; // Safe levels for Guitar Storge - 45% > 50%
int maxTemp = 23; // Safe levels for Guitar storage - 20c > 24c

DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino


#define I2C_ADDR 0x3F  //ALWAYS USE THIS WITH LCD I2C and Addres 0x3F
#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);

//Variables

int chk;
float hum;  //Stores humidity value
float temp; //Stores temperature value

void setup()
{

  Serial.begin(9600);
  pinMode(fan, OUTPUT);
  dht.begin();
  lcd.begin(16, 2);
  lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);
  lcd.setBacklight(HIGH);

}

void loop()
{

  delay(2000);

  float h = dht.readHumidity(); // Read humidity as %
  float t = dht.readTemperature(); // Read temperature as Celsius

  // Check if any reads failed and exit early (to try again).

  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
    return;

  }

  if (h > maxHum || t > maxTemp) {

    digitalWrite(fan, HIGH);
  }
  else
  {
    digitalWrite(fan, LOW);
  }

  hum = dht.readHumidity();
  temp = dht.readTemperature();

  //Print temp and humidity values to serial monitor

  Serial.print("Humidity: ");
  Serial.print(hum);
  Serial.print(" %, Temp: ");
  Serial.print(temp);
  Serial.println(" Celsius");

  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Temp: ");
  lcd.print(temp);
  lcd.print(" ");
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(1, 1);
  lcd.print("Hum: ");
  lcd.print(hum);
  lcd.print(" %");

  delay(2000); //Delay 2 sec.

}

Is the error message that you posted above the complete error message or only part of it ? Did you copy it using the "Copy error messages" button in the IDE or did you only select and copy part of it ?

The code compiles OK for me

Hi

I tried to copy it all, but i got an error message saying i had exceeded the max to download.

Copy it to a text file and attach the file to a post

Maybe I’m being stupid and missing something obvious, but why do you do two reads of temperature and humidity into different variable, using the first set to make a decision on, and the second set to report to the LCD and serial?

Why not just combine the delays into a single four second delay?

i deleted the wire.h from my own libraries in my Arduino folder

What exactly did you do?

UKHelibob

I hope this is ok.

AWOL, you always answer a question with another question, no you are not stupid, the sketch works, as a beginner that's ok by me, what i actually did, read my first post again.

Hi UKHeliBob

This forum would not let me upload a WORD document, i hope this is ok

Arduino letter.txt (12.2 KB)

gresleyman:
AWOL, you always answer a question with another question

Do I?

Can’t you see that you only need a single read; in fact for debugging it is preferable?

(That’s two questions!)

Do NOT try to read or edit Arduino files with Word, use Notepad or another text editor instead

C:\Users\dell\Documents\Arduino\libraries\LiquidCrystal\I2CIO.cpp:35:26: fatal error: ../Wire/Wire.h: No such file or directory

Please post the I2CIO.cpp file here

Hi.

How do i do that?? as the wire.h is a core library?

Not the Wire file, the file named I2CIO.cpp

The error message I quoted tells you where to find it

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

This, or something very similar, came up just a few days ago on the forum.

TheMemberFormerlyKnownAsAWOL: This, or something very similar, came up just a few days ago on the forum.

I saw it too. There are multiple hits for the phrase "/Wire/Wire.h: No such file or directory" from a search of the forum

Sorry, i cannot do that every time i go into the library the file is empty?

gresleyman:
Sorry, i cannot do that every time i go into the library the file is empty?

because

so i deleted the wire.h from my own libraries in my Arduino folder

?

You previously said

I was under the impression this was caused by multiple wire.h libraries, so i deleted the wire.h from my own libraries in my Arduino folder. then i tried to re load wire.h from the Library manager,

but when AWOL asked you

What exactly did you do?

You never replied. So what exactly did you do ?