Добрый день, коллеги!
Ошибка в компиляции. Подскажите, пожалуйста, в чем я накосячил.
Выдает ошибку:
lib/Wire/utility/twi.c:25:10: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
^~~~~~~~~~
compilation terminated.
Compiling .pio\build\upesy_wrover\liba7c\Adafruit BusIO\Adafruit_I2CDevice.cpp.o
Compiling .pio\build\upesy_wrover\lib218\Adafruit-GFX-Library-master\Adafruit_GFX.cpp.o
*** [.pio\build\upesy_wrover\lib310\Wire\utility\twi.c.o] Error 1
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp: In constructor 'Adafruit_I2CDevice::Adafruit_I2CDevice(uint8_t, TwoWire*)':
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp:17:20: error: 'I2C_BUFFER_LENGTH' was not declared in this scope
_maxBufferSize = I2C_BUFFER_LENGTH;
^~~~~~~~~~~~~~~~~
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp:17:20: note: suggested alternative: 'BUFFER_LENGTH'
_maxBufferSize = I2C_BUFFER_LENGTH;
^~~~~~~~~~~~~~~~~
BUFFER_LENGTH
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp: In member function 'bool Adafruit_I2CDevice::setSpeed(uint32_t)':
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp:306:10: error: 'class TwoWire' has no member named 'setClock'
_wire->setClock(desiredclk);
^~~~~~~~
*** [.pio\build\upesy_wrover\liba7c\Adafruit BusIO\Adafruit_I2CDevice.cpp.o] Error 1
================================================================================================== [FAILED] Took 12.60 seconds =================================================================================================
Ошибка в компиляции. Подскажите, пожалуйста, в чем я накосячил.
Код:
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino resetpin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
}
void loop() {
}
lib/Wire/utility/twi.c:25:10: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
^~~~~~~~~~
compilation terminated.
Compiling .pio\build\upesy_wrover\liba7c\Adafruit BusIO\Adafruit_I2CDevice.cpp.o
Compiling .pio\build\upesy_wrover\lib218\Adafruit-GFX-Library-master\Adafruit_GFX.cpp.o
*** [.pio\build\upesy_wrover\lib310\Wire\utility\twi.c.o] Error 1
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp: In constructor 'Adafruit_I2CDevice::Adafruit_I2CDevice(uint8_t, TwoWire*)':
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp:17:20: error: 'I2C_BUFFER_LENGTH' was not declared in this scope
_maxBufferSize = I2C_BUFFER_LENGTH;
^~~~~~~~~~~~~~~~~
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp:17:20: note: suggested alternative: 'BUFFER_LENGTH'
_maxBufferSize = I2C_BUFFER_LENGTH;
^~~~~~~~~~~~~~~~~
BUFFER_LENGTH
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp: In member function 'bool Adafruit_I2CDevice::setSpeed(uint32_t)':
.pio/libdeps/upesy_wrover/Adafruit BusIO/Adafruit_I2CDevice.cpp:306:10: error: 'class TwoWire' has no member named 'setClock'
_wire->setClock(desiredclk);
^~~~~~~~
*** [.pio\build\upesy_wrover\liba7c\Adafruit BusIO\Adafruit_I2CDevice.cpp.o] Error 1
================================================================================================== [FAILED] Took 12.60 seconds =================================================================================================