arduino-libraries / LiquidCrystal

Liquid Crystal Library for Arduino
http://arduino.cc/
253 stars 170 forks source link

Library doesn't work with Arduino Nano Every #38

Closed sstaub closed 4 years ago

sstaub commented 4 years ago

Can't compile with Arduino Nano Every

Arduino: 1.8.13 (Mac OS X), Board: "Arduino Nano Every, ATMEGA328"

In file included from /Applications/Arduino.app/Contents/Java/libraries/LiquidCrystal/src/LiquidCrystal.cpp:1:0: /Applications/Arduino.app/Contents/Java/libraries/LiquidCrystal/src/LiquidCrystal.h:45:36: error: expected class-name before '{' token class LiquidCrystal : public Print { ^ /Applications/Arduino.app/Contents/Java/libraries/LiquidCrystal/src/LiquidCrystal.h:86:9: error: 'Print' has not been declared using Print::write; ^~~~~ exit status 1 Error compiling for board Arduino Nano Every.

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

per1234 commented 4 years ago

Thanks for the report @sstaub! Since we already have a couple reports about this (https://github.com/arduino-libraries/LiquidCrystal/issues/33 and https://github.com/arduino/Arduino/issues/10025), I'm going to close it as a duplicate. You can check those issues for details on the bug and how it was fixed.

That fix will only become available at the next release of the Nano Every's Arduino megaAVR Boards platform.

Until then, the workaround is to roll back to the previous version of Arduino megaAVR Boards, which doesn't have the bug:

  1. (In the Arduino IDE) Tools > Board > Boards Manager
  2. Wait for the downloads to finish.
  3. From the list of available boards platforms, click "Arduino megaAVR Boards".
  4. From the "Select version" dropdown menu, select "1.8.5".
  5. Click the "Install" button.
  6. Wait for the installation to finish.
  7. Click the "Close" button.

Depending on your File > Preferences > Check for updates on startup setting, you may now occasionally get a notification that there is a new version of Arduino megaAVR Boards available. If you update back to Arduino megaAVR Boards 1.8.6, the bug will be back again, so refrain from doing that. However, you should keep an eye out for the 1.8.7 release, since that will have the bug fixed as well as additional enhancements from the development work done since the Arduino megaAVR Boards 1.8.5 release.