A while ago I changed my linux OS from Ubuntu to Mint, and now I have a problem with compiling any sketches
All I get is Error compiling for board Arduino Uno
And this is the error message for when I try to compile the Strandtest sketch:
loading libs from /home/rob/Downloads/arduino-1.8.19/libraries: loading library from /home/rob/Downloads/arduino-1.8.19/libraries/HC-SR04_Distance: loading library.properties: Error reading file: Error parsing data at line 0: Invalid line format, should be 'key=value'
Error compiling for board Arduino Uno.
It says it is trying to load the HC-SR04 library, but it should be the Adafruit neopixel library which is in the said sketch
Something has got screwed but what and how do I fix it.
Thanks
The obvious thing is to complete uninstall the IDE and re-install it.
If there are any third party libraries you are using, please make sure that they are in a sub-folder of your sketchbook folder, and make sure to select the sketchbook folder as such in the IDE preferences.
If that doesn't help, please post your sketch.
I uninstalled arduino IDE, then re installed it. I then made sure the sketchbook folder was set in preferences.
Now I am getting error messages with all my sketches during the setup of the new install of Arduino IDE. It says they have bad names???, and can't be used.
How can that happen, as I have used them previously
Bad names means that there is something in the name that the IDE doesn't accept, usually it is a ' ' (space) that is causing that. The folder that the sketch is in as well as the ino file can not have any spaces in the name.
The names of the sketches also have underlines between words or numbers, and they have been like that since I first downloaded them a year or more since.I use folders with the name of the sketch inside the folder and I use ordanairy English characters like abc and 123
I have just downloaded the latest version of fastLED, moved the zip file to my Arduino\libraries folder then tried to insert into a sketch.
I got an error message saying the zip file library can't be used because it has a bad name. How can that be
I have moved all my sketches and library files onto a USB stick , and moving them back 1 by 1 after downloading the latest library file. In this case it is the DHT library.
I have used this sketch about 2 years ago without any problems, and now it won't compile due to the error saying DHT.h is missing
include <DHT.h>
#include <Wire.h>
#include <hd44780.h> // main hd44780 header
#include <hd44780ioClass/hd44780_I2Cexp.h> // i2c expander i/o class header
#define DHTPin 7
#define DHTTYPE DHT22
hd44780_I2Cexp lcd; // declare lcd object: auto locate & config exapander chip
DHT dht;
const int LCD_COLS = 16;
const int LCD_ROWS = 2;
// Define variables
float hum; //Stores humidity value
float temp; //Stores temperature value
void setup()
{
dht.setup(DHTPin);
lcd.begin(LCD_COLS, LCD_ROWS);
//lcd.begin();
}
void loop()
{
delay(2000); // Delay so sensor can stabalize
float temp = dht.getTemperature();
float humi = dht.getHumidity();
lcd.setCursor(0, 0);
lcd.print("Temp: ");
lcd.print(temp);
lcd.print(" C");
lcd.setCursor(0, 1);
lcd.print("Humi: ");
lcd.print(humi);
lcd.print(" %");
//delay(2000);
}
usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/Wire /tmp/build159064429951069768.tmp/Work_Temp_Humidity.cpp -o /tmp/build159064429951069768.tmp/Work_Temp_Humidity.cpp.o
Work_Temp_Humidity.ino:1:17: fatal error: DHT.h: No such file or directory
compilation terminated.
Ok, so where should I have installed the library. As I said above my library files are \Arduino\Sketchbook\libraries.
Should they be Arduino\Libraries
In the preference I have Show verbose output during compilation checked
Verify code after upload checked
Check for updates at startup checked
update sketch files to new extension on save (pde -> .ino) checked
What about my environment, what should I be looking for specifically.
I uninstalled my existing version 1.8.9? and installed version 2.1.0.5 yesterday
No \Arduino\Sketchbook\libraries. is correct for 3rd party libraries,
I don't know how this is with Linux, but on windows your sketchbook should not be in the program files folder (or subfolders) since those are 'write-protected' to some extend.