Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    Thanks for shortening your posted code. But in this case it may be too much trimming. Maybe there's enough information here to determine what has gone wrong. But I don't see it. (Also, most of the time, I only look at and fix the 1st compiler error. Often this fixes many of the other errors.) Commented Jun 21, 2023 at 12:39
  • @st2000 Thank you for the comment! I will try first to organize the errors into categories and will update the question. Commented Jun 21, 2023 at 12:46
  • maybe just rename functions.h to functions.ino and remove the #include "functions.h" line. arduino.github.io/arduino-cli/0.33/sketch-build-process/… Commented Jun 21, 2023 at 13:15
  • At a guess, 'SoftwareSerial' does not name a type; suggests that the definition of an SoftwareSerial object was seen by the compiler before it had read SoftwareSerial.h. See @edgarbonet's answer, in particular, about partitioning a large project file into separately compiled files. It seems like all of your files are still compiled in one run which leaves compilation order out of your control. That can cause the first use of a symbol such as SoftwareSerial appearing before its declaration. Commented Jun 21, 2023 at 19:06
  • The include for SoftwareSerial needs to go into the .ino file (the main project file). That way it is included appropriately. Please see my second answer. Commented Jun 26, 2023 at 10:26