Stutchbury / EncoderButton

Lossless event based rotary encoder+button library for Arduino and Teensy
GNU General Public License v2.0
34 stars 8 forks source link

PlatformIO Encoder.h dependency error #3

Closed therealpurplemana closed 2 years ago

therealpurplemana commented 2 years ago

Hi, I got your examples working in Arduino IDE and your library works great! I wanted to use it for my project!

When initiating the library from PlatformIO, it always throws an error on line 36 looking for Encoder.h even when the library is included and installed properly (I have it working from Arduino IDE). Have you seen or encountered this error before?

Stutchbury commented 2 years ago

I have not yet tested in PlatformIO but it may be throwing this error because there is no library.json (yet). This library will not attempt to include Encoder.h if you have already included it, so does that work?

Stutchbury commented 2 years ago

Closed (no response)

Stutchbury commented 2 years ago

PlatformIO tries to install Bounce2 github master, so we have to stick to 2.60 until there's an Arduino release and Encoder 1.4.1 is used instead of 1.4.2. The following works for me:

lib_deps = Bounce2 @ 2.60.0 paulstoffregen/Encoder @ 1.4.2 stutchbury/EncoderButton @ ^1.0.4

BUT if you have already installed the 'wrong' versions of any of the above, uninstalling them via the GUI will not work on its own. Uninstall from the GUI then manually delete the .pio/libdeps/teensy41/Bounce2 and Encoder folders. When you add paulstoffregen/Encoder @ 1.4.2 there will not be an Encoder folder in libdeps - perhaps a later version in the Teensy platform because it is in the Dependency Graph on compile...

Edit: Just noticed this further up the compile log: Library Manager: Installing paulstoffregen/Encoder @ 1.4.2 Library Manager: Already installed, built-in library