1

I got this error:

Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Board: "Arduino/Genuino Uno"

Multiple libraries were found for "LiquidCrystal.h"  Used: C:\Program
Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\libraries\LiquidCrystal
Not used:
C:\Users\siddh\OneDrive\Documents\Arduino\libraries\libraries readlink
C:\Users\siddh\OneDrive\Documents\Arduino\libraries\SimpleDHT\SimpleDHT.cpp:
The system cannot find the file specified. Error compiling for board
Arduino/Genuino Uno.

This report would have more information with "Show verbose output
during compilation" option enabled in File -> Preferences.

This is the code i use:

//We'll start by adding our libraries

 #include <LiquidCrystal.h>

 #include <SimpleDHT.h>

//Declaring digital pin no 6 as the dht11 data pin

int pinDHT11 = 6;
SimpleDHT11 dht11;

//Declaring the lcd pins

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
// Don't forget to choose 9600 at the port screen

  Serial.begin(9600);

//Telling our lcd to start up

  lcd.begin(16, 2);


}

void loop() {

  //These serial codes are for getting readings on the port screen aswell as the LCD display, since they'll offer us a more detailed interface


  Serial.println("=================================");
  Serial.println("DHT11 readings...");
  delay(2000);

  byte temperature = 0;
  byte humidity = 0;
  int err = SimpleDHTErrSuccess;

  //This bit will tell our Arduino what to do if there is some sort of an error at getting readings from our sensor
  if ((err = dht11.read(pinDHT11, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
    Serial.print("No reading , err="); Serial.println(err);delay(1000);
    return;
  }

  Serial.print("temp: ");
  Serial.print((int)temperature); Serial.print(" Celcius, ");
  Serial.print("humidity:");
  Serial.print((int)humidity); Serial.println(" %");

  //Telling our lcd to refresh itself every 0.75 seconds
  lcd.clear();


 //Choosing the first line and row

 lcd.setCursor(0,0);

//Typing Temp: to the first line starting from the first row
  lcd.print("Temp: ");

//Typing the temperature readings after "Temp: " 
  lcd.print((int)temperature);

//Choosing the second line and first row
  lcd.setCursor(0,1);

//Typing Humidity(%): to the second line starting from the first row
  lcd.print("Humidity(%): ");

//Typing the humidity readings after "Humidity(%): "
  lcd.print((int)humidity);




  delay(750);
}
  • You should post your entire output, not just the last couple of lines. The error itself is invariably one of the first things printed, not the last. Als you should do as it suggests and turn on verbose output. – Majenko Apr 14 '18 at 9:57
3

There is a bug that causes this error when you use the Arduino IDE with files located under OneDrive.

The simplest solution is to move any files that will be used with the Arduino IDE out of OneDrive to any other convenient location on your computer. It looks like you have your sketchbook folder located in the OneDrive so you will want to change that via the Arduino IDE's File > Preferences > Sketchbook location. The Arduino IDE does not automatically move the files from the previous sketchbook folder to the new folder so you will need to either move any files to the new sketchbook folder or else reinstall them.

There are some possible workarounds if you want to to continue using the Arduino IDE with OneDrive listed in the issue report: https://github.com/arduino/arduino-builder/issues/254

| improve this answer | |
1

I have had this problem as well and I concur with per1234 that the solution (for now) is that you have to move your sketches out of the OneDrive folder.

You used to be able to have your sketches within OneDrive (I did for many years). Since release 1.6.6 things have changed and you can no longer compile files that you once used to be able to compile inside a OneDrive folder.

In addition to per1234's great answer (ie move the sketches outside of the Ondrive folder) there are 2 other options. Firstly you could download and install version 1.6.5 which was before the Arduino Builder was incorporated. The other option is to use the Beta V1.9.0 avalable from the Beta Channel.


UPDATE:

The issue with OneDrive folders has been resolved as of version 1.8.6.

https://www.arduino.cc/en/Main/ReleaseNotes

ARDUINO 1.8.6 2018.08.23

[ide]

  • Updated arduino-builder to 1.4.0:
    • parallel build (improve compile speed)
    • better reuse of already compiled files
    • Windows: fixed build for sketch stored under OneDrive cloud folders

Simply update to a newer version of the Arduino IDE and you will be able to compile and upload your sketch.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.