LoginSignup
1
0

More than 1 year has passed since last update.

PlatformIOでWire.hエラーメモ

Posted at

EspMQTTClientを使おうとしたところ、ビルド時にWire.hの読み込みエラーが表示されました。

compilation terminated.
*** [.pio/build/m5stack-atom/libe3e/M5Atom/utility/MPU6886.cpp.o] Error 1
In file included from .pio/libdeps/m5stack-atom/M5Atom/src/M5Atom.cpp:4:
.pio/libdeps/m5stack-atom/M5Atom/src/M5Atom.h:53:10: fatal error: Wire.h: No such file or directory

スクリーンショット 2023-04-29 16.40.50.png

公式のフォーラムで同じ話題が

スクリーンショット 2023-04-29 20.57.56.png

lib_deps = Wireを指定すればOKとのことでした。

ということでplatromio.iniを以下のような感じで加筆

platromio.ini
; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:m5stack-atom]
platform = espressif32
board = m5stack-atom
framework = arduino
lib_deps = 
	m5stack/M5Atom@^0.1.0
	fastled/FastLED@^3.5.0
	earlephilhower/ESP8266Audio@^1.9.7
	plapointe6/EspMQTTClient@^1.13.3
    Wire
monitor_speed = 115200

他のライブラリがバージョンなど入ってるなかでWireだけ違和感ありますが、これで動きました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0