0

I bought the Airgradient DIY as demonstrated in https://www.youtube.com/watch?v=Cmr5VNALRAg

It's working at the moment. I changed some code. I now want to upload this code but I get the error

AirGradient.h:10:28: fatal error: SoftwareSerial.h: No such file or directory

I have no idea why this is happening because it used to work just fine before and I have SoftwareSerial.h located at /home/user/Downloads/arduino-1.8.19-linux64/arduino-1.8.19/hardware/arduino/avr/libraries/SoftwareSerial/src/SoftwareSerial.h.

I am using the Arduino IDE under Ubuntu Linux 22.04.

Are the search paths somehow not configured properly? How do I solve this?

Adriaan
  • 715
  • 10
  • 22

1 Answers1

-2

Ok, before saying anything, I wouldn't recommend my worst enemy to use Arduino IDE to do work. But I know there are lovers, I just ain't one.

But I can't see this without leaving some Suggestions:

  • Download VSCode.
  • Install PlatformIO.

Moving on.

Your Arduino IDE expects you to have your library files installed in the <sketchbook-location>/libraries folder.

You can find the path to your sketchbook-location in Arduino IDE under Preferences.

It should be the first Item.

If your sketchbook-location matches with the path you pasted on your question, /home/user/Downloads/arduino-1.8.19-linux64/arduino-1.8.19/hardware/arduino/avr/, then I would just try to delete the SoftSerial library at once and reinstall it using the Library Manager.

Don't forget to change the board type to ESP8266 (or wemos D1).

If none of that works, just go with my list of suggestions.

Nathan Almeida
  • 179
  • 1
  • 14
  • Thanks for your reply, but it's not really an answer to my question. I would like to know why the Arduino IDE does not find libraries that are already installed. And how I run diagnostics to find what is going wrong. Nonetheless, in the meanwhile I indeed when for the PlatformIO option and I got it to work there. Although that was also certainly not a walk in the park. – Adriaan Jun 28 '22 at 21:33