4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M5ATOM コンパイルエラー

Last updated at Posted at 2022-01-13

S__8503370.jpg

基本的な使い方のサイトを見て扱ってみたがコンパイルエラー

Arduino:1.8.19 (Windows 10), ボード:"M5Stack-ATOM, Default, 1500000, None"

C:\Users\user\Documents\Arduino\libraries\M5Atom\src\M5Atom.cpp: In member function 'void M5Atom::begin(bool, bool, bool)':
C:\Users\user\Documents\Arduino\libraries\M5Atom\src\M5Atom.cpp:23:28: error: call of overloaded 'begin(int, int, int)' is ambiguous
   Wire.begin(25, 21, 100000);
                            ^
In file included from C:\Users\user\Documents\Arduino\libraries\M5Atom\src\M5Atom.h:53,

                 from C:\Users\user\Documents\Arduino\libraries\M5Atom\src\M5Atom.cpp:4:

C:\Users\user\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.2\libraries\Wire\src/Wire.h:79:10: note: candidate: 'bool TwoWire::begin(int, int, uint32_t)'

     bool begin(int sda=-1, int scl=-1, uint32_t frequency=0); // returns true, if successful init of i2c bus
          ^~~~~
C:\Users\user\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.2\libraries\Wire\src/Wire.h:80:10: note: candidate: 'bool TwoWire::begin(uint8_t, int, int, uint32_t)'

     bool begin(uint8_t slaveAddr, int sda=-1, int scl=-1, uint32_t frequency=0);

          ^~~~~
exit status 1
ボードM5Stack-ATOMに対するコンパイル時にエラーが発生しました。
「ファイル」メニューの「環境設定」から
「より詳細な情報を表示する:コンパイル」を有効にすると
より詳しい情報が表示されます。

スクリーンショット 2022-01-13 151441.png

Documentのlibraries¥M5Atom¥srcにある。
M5Atom.cpp
utility内にある
MPU6886.cpp
のWire.begin(25, 21, 100000);を
Wire.begin(25, 21, 100000U);
にすればコンパイル出来る。

4
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
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?