arduino.h again

Im usualy able to find things myself but right now im in need of a silverspoon. :slight_smile:

As a newbie jumping to the way to deep end ive tried to run the ecoduino libraries AutoWatering and DHT
but get the following error.

Arduino: 1.8.13 (Linux), Board: "Arduino Leonardo"

In file included from /home/pi/Arduino/ecoduino/ecoduino.ino:3:0:
/home/pi/Arduino/libraries/AutoWatering/AutoWatering.h:18:10: fatal error: arduino.h: No such file or directory
#include <arduino.h>
^~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino Leonardo.

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

seems to come from this in the AutoWatering.h

#ifndef AutoWatering_h
#define AutoWatering_h
#include <avr/eeprom.h>
#include <arduino.h>

#define addr 0

Anybody got a link to a possible solution

The problem is that the library author was sloppy and got the case of the filename wrong. it's "Arduino.h", not "arduino.h". This is a common problem you'll see from developers using case-insensitive file systems like Windows and macOS have because on those operating systems there is no difference between "Arduino.h" and "arduino.h" but Linux uses a case sensitive file system, so this becomes an error for the Linux users.

You can fix it by opening /home/pi/Arduino/libraries/AutoWatering/AutoWatering.h in a text editor and changing line 18 from:

#include <arduino.h>

to:

#include <Arduino.h>

I've submitted a pull request to fix this bug in the library:

Considering the library hasn't been worked on for 8 years, I'm not sure whether DFRobot will take notice, but if nothing else it makes the fix accessible to all the users of the library.

Thanks pert
So is the solution to change a -> A and save?

That's correct.

Easier and simpler than I thought it would be. Thanks again.

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.