Error key=value uploading

Preformatted text
#include <LiquidCrystal.h>

LiquidCrystal lcd(10, 9, 5, 4, 3, 2);

const int trigPin = 11;
const int echoPin = 12;

long duration;
int distance;

void setup() {
// put your setup code here, to run once:
analogWrite(6, 100);
lcd.begin(16, 2);
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
Serial.begin(9600); // Starts the serial communication

void loop() {
long duration, distance;
digitalWrite(trigPin, HIGH);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration / 2) / 29.1;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");

lcd.setCursor(0, 0);
lcd.print("Distance = ");
lcd.setCursor(11, 0);
lcd.setCursor(14, 0);

Preformatted text
error message:
loading libs from C:\Users\Owen\Documents\Arduino\libraries: loading library from C:\Users\Owen\Documents\Arduino\libraries\Arduino_Cloud_Provider_Examples: loading Error reading file: Error parsing data at line 0: Invalid line format, should be 'key=value'

This has just started recently on most of my sketches that have uploaded before.
Error compiling for board Arduino Uno.

Do you have a question?

Please remember to use code tags when posting code, and if you're seeing error messages, post those too.

Please help me with adding code tags. my question is at the bottom.

Code tags are the "</>" icon on the editor toolbar.

This actually looks like an installation problem, not a programming issue.
(Now there's a first!)

I can't help, but maybe a toolchain expert will drop by.

You should remove the "solved" status, or people will ignore the topic

Looks like the '' file in the library named 'Arduino_Cloud_Provider_Examples' has a bad first line. You could open that file in your favorite text editor and remove the bad line. If it looks like a comment, the first character of the line should be '#'.

I think you can find the proper contents here:

1 Like

Thanks for your reply, I'm sorry but I need more help please. I have done what you suggested but I just don't understand. How can I open my file in my text editor and where is the first line for the #. the sketch:

Udemy Course - Crazy about Arduino - Level 1 - Your Starting Point
Step-1B - LEDs Test and Animation Wave

Created by Idan Gabrieli
// ******************************************
// Global variables Declaration - Mapping physical sensors connections to Arduino PINs
const int testButton=2;
const int waveButton=4;

// Mapping all LEDs physical connections to Arduino PINs
const int ledsPin={3,5,6,9,10,11};
boolean ledsOn=false; // the present state of the LEDs (ON/OFF)
boolean lastButton=LOW; // the last button state
boolean currentButton=LOW; // the current button state
// ******************************************
void setup()
pinMode (testButton, INPUT); // set test button as input
pinMode (waveButton, INPUT); // set wave animation button as input
for (int i=0; i<6; i++) // set all LEDs to output
pinMode(ledsPin[i], OUTPUT);
// ******************************************
void loop()
// ******************************************
// if the button was pressed than wait for the button state to stablize and
boolean debounce(int buttonPIN,boolean last)
boolean current= digitalRead(buttonPIN);
if (current != last) {
delay(5); // wait 5ms for button state stablizing
current = digitalRead(buttonPIN); // read it again
return current;
// ******************************************
// checking if the test button was pressed and turn ON or OFF all LEDs
void checkTestButton()
currentButton = debounce(testButton,lastButton);
if (currentButton == HIGH && lastButton == LOW) // button was pressed
ledsOn =!ledsOn; //toggle the LEDs state
lastButton = currentButton;
for (int i=0; i<6; i++)
digitalWrite(ledsPin[i], ledsOn);
// ******************************************
// checking if the wave button was pressed and run animation wave on LEDs
void checWaveButton()
if(digitalRead(waveButton) == HIGH)// button is pressed
for(int i=0; i<6; i++)
digitalWrite(ledsPin[i], HIGH);
digitalWrite(ledsPin[i], LOW);
for(int i=5; i>=0; i--)
digitalWrite(ledsPin[i], HIGH);
digitalWrite(ledsPin[i], LOW);
// ******************************************

Please edit your post to add code tags ("</>" editor button).

The file in question is in the library folder (sketchbook directory) and has nothing to do with your sketch.

I think the easiest thing to do will be to remove and then reinstall the problematic library. Please try this:

  1. Open this folder in Windows File Explorer:
  2. Delete the folder named Arduino_Cloud_Provider_Examples.
    Please be very careful when deleting things from your computer. When in doubt, back up!
  3. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus.
  4. Wait for the update to finish.
  5. In the "Filter your search" field, type "Arduino Cloud Provider Examples".
  6. Press Enter.
  7. Scroll down through the list of libraries until you see "Arduino Cloud Provider Examples by Arduino". Click on it.
  8. Click the Install button.
  9. Wait for the installation to finish.
  10. Click the Close button.

Now try compiling your sketch again. Hopefully this time you will have a valid installation of the "Arduino Cloud Provider Examples" library.

I have deleted and then reinstalled the arduino cloud provider examples, but it still gives same error.

(Error reading file: Error parsing data at line 0: Invalid line format, should be 'key=value')
What is parsing? I was working on the problem this morning and discovered something.
I tried to upload the program and it worked. Later I tried to upload it again (the same sketch) and there was the error again. This is so strange.

Please post the first few lines of the file in the relevant directory.

Is this what you are asking for:
name=Adafruit GFX Library
sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.
paragraph=Install this library in addition to the display library for your hardware.
depends=Adafruit BusIO

That is a different library. The error message you shared was for the "Arduino Cloud Provider Examples`" library:

Is the path in the error message different now?

Sorry, you are correct but that is what I got when I try to open "Arduino Cloud Provider Examples`" library:

So when I try again this is what I get:

(// nothing here, this is just an empty library containing examples!)

It shows on my manage library that the arduino cloud provider examples is installed, but it does not show up on my ide list of libraries.

I am having a lot of trouble understanding your comment. You are describing the contents of the file src/ArduinoCloudProviderExamples.h:

Are you certain you are looking at the file?

Please take some time to provide a very detailed description of the problem you are having, including the full and exact text of any error or warning messages.

Please take some time to provide a very detailed description of what you have tried doing to fix the problem.

Just forget it. I thought I gave you my best description of the problem. I don't know what else you want

The documentation on library properties file format is here

The information for name states

Note that libraries with a name value starting with Arduino will no longer be allowed addition to the Library Manager index as these names are now reserved for official Arduino libraries.

The library properties for our library shows

name=Arduino Cloud Provider Examples

This may not allowed. Go into the library properties file and change the first line to something not beginning with "Arduino" and all should be well. For example

name = Cloud Provider Examples

See if this change corrects the error message.

This is an official library, so the name is fine:|Arduino|Arduino Cloud Provider Examples

the "Arduino" in the second field classifies it as an official library, which allows it to use the name.

This restriction also only applies to whether or not the library is offered by Library Manager. That is not handled by the IDE. The IDE doesn't care one bit.

I recommend against changing the name because this will cause the library to no longer be recognized by Library Manager, meaning that you won't get update notifications.

1 Like

Now when I try to install
(Arduino Cloud Provider Examples) from manage libraries, it does not install, it just goes blank when I press install. I can't remove arduino.

You're on your own then.