Since the new update I get

C:\users\ats37.platformio\lib\LiquidCrystal_ID136\I2CIO.cpp:54:21: fatal error: Wire.h: No such file or directory


  • Looking for Wire.h dependency? Check our library registry!
  • CLI > platformio lib search “header:Wire.h”
  • Web > PlatformIO Registry

compilation terminated.
*** [.pio\build\nanoatmega328new\lib356\LiquidCrystal_ID136\I2CIO.cpp.o] Error 1

Just this snip I get the error

#include <Arduino.h>
#include <LiquidCrystal.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}

Adding lib_deps = Wire doesn’t help?

Add #include <Wire.h> before #include <LiquidCrystal.h> … it’s just how that library gets put together.

The Problem was that the new update downloaded a Library LiquidCrystal_ID136 and this was causing the Problem Thank you for helping

Hi,
I have exactly the same problem and unfortunately too dum to solve it!
When you write " the new update downloaded a library LiquidCrystal_ID136…" and this caused the problem?
How can I get across this problem? What do I have to do?
Please be so kind and help one who doesn’t know!!
Thanks for your kindness in advance!
Regards E3Hans

What’s your exact platformio.ini and error message?

Hi,
shall I upload the complete platformio.ini or just the starting part where the board and the libraries are listed?
Thanks for your reply anyhow!
Regards
E3Hans

Thats the starting error. I assume, all following warnings are emmited due to the first error!?

Compiling .pio\build\STM32F103RC_btt\libb27\LiquidCrystal\LiquidCrystal.cpp.o
.pio\libdeps\STM32F103RC_btt\LiquidCrystal\I2CIO.cpp:54:13: fatal error: Wire.h: No such file or directory

Here comes the partial platformio.ini:

# Marlin Firmware

# PlatformIO Configuration File

#

# For detailed documentation with EXAMPLES:

#

# http://docs.platformio.org/en/latest/projectconf.html

#

# Automatic targets - enable auto-uploading

# targets = upload

#

# By default platformio build will abort after 5 errors.

# Remove '-fmax-errors=5' from build_flags below to see all.

#

[platformio]

src_dir      = AAB-Marlin/Marlin-2.0.5_SKR-E3-DIP

boards_dir   = buildroot/share/PlatformIO/boards

default_envs = STM32F103RC_btt

[common]

default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>

extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py

build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants

lib_deps =

  #mbed-gellmish/Pozyx-Arduino-library-master_v5_1 @ 0.0.0+sha.f0d0d288fac9

  LiquidCrystal

  TMCStepper@>=0.6.2,<1.0.0

  Adafruit NeoPixel

  ArduinoJson

  U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip

  Adafruit_MAX31865=https://github.com/adafruit/Adafruit_MAX31865/archive/master.zip

  LiquidTWI2=https://github.com/lincomatic/LiquidTWI2/archive/master.zip

  Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/0.8.0.zip

  SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip

  SailfishRGB_LED=https://github.com/mikeshub/SailfishRGB_LED/archive/master.zip

  SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip

# Globally defined properties

# inherited by all environments

[env]

framework     = arduino

build_flags   = ${common.build_flags}

lib_deps      = ${common.lib_deps}

monitor_speed = 250000

#################################

#                               #

#   Unique Core Architectures   #

#                               #

#  Add a new "env" below if no  #

# entry has values suitable to  #

#   build for a given board.    #

#                               #

#################################

You seem to be attempting to compile an older version of Marlin? The newer ones do the library management differently. The lib_deps in [common] is empty.

Hi Max,
thanks for your fast response!
Do I understand you right, that using the latest Marlin-Version ( …I think it’ the “bug-fixed” one?) is the solution for my “not-compile-problem”?
Best Regards
E3Hans

Well there are threeways.

If you want to compile this older version of Marlin (because you e.g. know that your config header file sure works with this version of Marlin): Either

  • get an older version of PlatformIO (version 4.x) in which this platformio.ini worked (Marlin: Help me ERRROR ModuleNotFoundError - #11 by maxgerhardt)
  • or fix this platformio.ini to work with your current core (assuming normal recent 5.x core version). There I’d suggest adding Wire to the lib_deps list and/or doing a #include <Wire.h> at the top of the Marlin.ino file.

If you want to stay up-to-date then you should grab the newest version of marlin (e.g. here, idk if 2.0.x or 2.0.x-bugfix is the one for you) and re-insert your configuration headher files and select the correct environment in the default_envs = xxxx expreession of the platformio.ini.

Hi Max,
this sounds like a good way! I definitely need some time to check and rebuild the whole thing.
But man, I will definitely include you in my evenig-prayer for your kind help!
Would you mind if I come back to you in case of further problems?
Best regards
E3Hans

The forums and this community is always open, just open a new topic then with all infos needed to help you (which version of Marlin, which PlatformIO core version, which error, what you tried,…).

1 Like