No such file or directory compilation terminated ошибка компиляции

Arduino.ru

Загрузка…

Я хотел подключить библиотеку «IRremote» для работы с инфрокрасным датчиком. При подключении заголовочного файла «IRremote.h» возникает следующая ошибка:

IRremote.h: No such file or directory
compilation terminated.

exit status 1

compilation error: IRremote.h: No such file or directory

Если сменить <IRremote.h> на "IRremote.h" то ситуация такая же.

Как это исправить?

Пример кода, который я пытаюсь скомпилировать:

#include <LiquidCrystal.h>

#include <IRremote.h>


IRrecv irrecv(2); // указываем вывод, к которому подключен приемник

decode_results results;

void setup() {
  irrecv.enableIRIn(); // запускаем прием
}

void loop() {
  if ( irrecv.decode( &results )) { // если данные пришли
    switch ( results.value ) {
    case 0xFFA857:
        digitalWrite( 13, HIGH );
        break;
    case 0xFFE01F:
        digitalWrite( 13, LOW );
        break;
    }    
    irrecv.resume(); 
  }
}

  • #1

АХТУНГ!
Вставка от модератора:
Подробное руководство по загрузке прошивки в Ардуино от Алекса Гайвера:

Прежде чем строчить сообщения, внимательно ознакомьтесь!!!

=====================================================================================================

Здраствуйте, у меня возникла ошибка с компиляцией скетча, всё сделал по инструкции, несколько раз всё перепроверил, но всё равно возникает ошибка
Arduino: 1.6.4 (Windows 7), Плата»Arduino Nano, ATmega328″

In file included from C:Program FilesArduinolibrariesLCD_1602_RUS-master/LCD_1602_RUS.h:1:0,
from money_box_counter.ino:35:
C:Program FilesArduinolibrariesLCD_1602_RUS-master/LiquidCrystal_I2C.h:7:18: fatal error: Wire.h: No such file or directory
#include <Wire.h>
^
compilation terminated.
Ошибка компиляции.

Безымянный.png

Изменено: 19 Мар 2020

  • #2

Написано же четко.
fatal error: Wire.h: No such file or directory
#include <Wire.h>
библеотека Wire.h — Данный файл или каталог отсутствует

  • #3

Не могу запрограммировать Arduino. Не было под рукой всех нужных деталей,поэтому сделал на микрофоне,который Алекс НЕ советовал,но вариантов не было. Суть не в этом. Вылезает ошибка компиляции. Библиотеки заново копировал по нескольку раз и не помогает. С проектом Ambilight тоже была такая же проблема. Не мог найти какой-то файл. Что делать? OTdrAa-0H7k.jpg1546930986412.png

  • #4

Всем привет!

Нужна помощь, скетч «CUBE_Gyver.ino» грузится на ура, а вот «CUBE_Gyver_v2.ino». Библиотека GyverButton взята из архива с проектом.

G:LEDcube-masterCUBE_Gyver_v2CUBE_Gyver_v2.ino: In function ‘void setup()’:

CUBE_Gyver_v2:132:9: error: ‘class GButton’ has no member named ‘setStepTimeout’

butt1.setStepTimeout(100); // настрйока интервала инкремента (по умолчанию 800 мс)

^

CUBE_Gyver_v2:133:9: error: ‘class GButton’ has no member named ‘setStepTimeout’

butt2.setStepTimeout(100); // настрйока интервала инкремента (по умолчанию 800 мс)

^

G:LEDcube-masterCUBE_Gyver_v2CUBE_Gyver_v2.ino: In function ‘void loop()’:

CUBE_Gyver_v2:144:13: error: ‘class GButton’ has no member named ‘isClick’

if (butt1.isClick()) {

^

CUBE_Gyver_v2:149:13: error: ‘class GButton’ has no member named ‘isClick’

if (butt2.isClick()) {

^

CUBE_Gyver_v2:155:13: error: ‘class GButton’ has no member named ‘isStep’

if (butt1.isStep()) { // если кнопка была удержана (это для инкремента)

^

CUBE_Gyver_v2:158:13: error: ‘class GButton’ has no member named ‘isStep’

if (butt2.isStep()) { // если кнопка была удержана (это для инкремента)

^

Используем библиотеку SPI версии 1.0 из папки: C:Program Files (x86)ArduinohardwarearduinoavrlibrariesSPI
Используем библиотеку GyverButton в папке: C:Program Files (x86)ArduinolibrariesGyverButton (legacy)
Используем библиотеку GyverHacks в папке: C:Program Files (x86)ArduinolibrariesGyverHacks (legacy)
Используем библиотеку GyverTimer в папке: C:Program Files (x86)ArduinolibrariesGyverTimer (legacy)
Используем библиотеку EEPROM версии 2.0 из папки: C:Program Files (x86)ArduinohardwarearduinoavrlibrariesEEPROM
exit status 1
‘class GButton’ has no member named ‘setStepTimeout’

Если брать самую последнюю версию библиотеки GyverButton отсюда https://community.alexgyver.ru/resources/biblioteka-gyverbutton.1/

для CUBE_Gyver.ino

G:LEDcube-masterCUBE_GyverCUBE_Gyver.ino: In function ‘void setup()’:

CUBE_Gyver:82:9: error: ‘class GButton’ has no member named ‘setIncrStep’

butt1.setIncrStep(5); // настройка инкремента, может быть отрицательным (по умолчанию 1)

^

CUBE_Gyver:83:9: error: ‘class GButton’ has no member named ‘setIncrTimeout’

butt1.setIncrTimeout(100); // настрйока интервала инкремента (по умолчанию 800 мс)

^

CUBE_Gyver:84:9: error: ‘class GButton’ has no member named ‘setIncrStep’

butt2.setIncrStep(-5); // настройка инкремента, может быть отрицательным (по умолчанию 1)

^

CUBE_Gyver:85:9: error: ‘class GButton’ has no member named ‘setIncrTimeout’

butt2.setIncrTimeout(100); // настрйока интервала инкремента (по умолчанию 800 мс)

^

G:LEDcube-masterCUBE_GyverCUBE_Gyver.ino: In function ‘void loop()’:

CUBE_Gyver:106:13: error: ‘class GButton’ has no member named ‘isIncr’

if (butt1.isIncr()) { // если кнопка была удержана (это для инкремента)

^

CUBE_Gyver:107:23: error: ‘class GButton’ has no member named ‘getIncr’

modeTimer = butt1.getIncr(modeTimer); // увеличивать/уменьшать переменную value с шагом и интервалом

^

CUBE_Gyver:109:13: error: ‘class GButton’ has no member named ‘isIncr’

if (butt2.isIncr()) { // если кнопка была удержана (это для инкремента)

^

CUBE_Gyver:110:23: error: ‘class GButton’ has no member named ‘getIncr’

modeTimer = butt2.getIncr(modeTimer); // увеличивать/уменьшать переменную value с шагом и интервалом

^

Используем библиотеку SPI версии 1.0 из папки: C:Program Files (x86)ArduinohardwarearduinoavrlibrariesSPI
Используем библиотеку GyverButton в папке: C:Program Files (x86)ArduinolibrariesGyverButton (legacy)
exit status 1
‘class GButton’ has no member named ‘setIncrStep’

для CUBE_Gyver_v2.ino

C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.cpp:326:1: error: prototype for ‘GTimer::GTimer(uint16_t)’ does not match any in class ‘GTimer’

GTimer::GTimer(uint16_t interval) {

^

In file included from C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.cpp:1:0:

C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.h:99:7: error: candidates are: constexpr GTimer::GTimer(GTimer&&)

class GTimer

^

C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.h:99:7: error: constexpr GTimer::GTimer(const GTimer&)

C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.h:103:2: error: GTimer::GTimer(uint32_t)

GTimer(uint32_t); // объявление таймера с указанием интервала

^

C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.cpp:324:1: error: GTimer::GTimer()

GTimer::GTimer() {}

^

C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.cpp:331:6: error: prototype for ‘void GTimer::setInterval(uint16_t)’ does not match any in class ‘GTimer’

void GTimer::setInterval(uint16_t interval) {

^

In file included from C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.cpp:1:0:

C:Program Files (x86)ArduinolibrariesGyverHacksGyverHacks.h:104:7: error: candidate is: void GTimer::setInterval(uint32_t)

void setInterval(uint32_t); // установка интервала

^

Используем библиотеку SPI версии 1.0 из папки: C:Program Files (x86)ArduinohardwarearduinoavrlibrariesSPI
Используем библиотеку GyverButton в папке: C:Program Files (x86)ArduinolibrariesGyverButton (legacy)
Используем библиотеку GyverHacks в папке: C:Program Files (x86)ArduinolibrariesGyverHacks (legacy)
Используем библиотеку GyverTimer в папке: C:Program Files (x86)ArduinolibrariesGyverTimer (legacy)
Используем библиотеку EEPROM версии 2.0 из папки: C:Program Files (x86)ArduinohardwarearduinoavrlibrariesEEPROM
exit status 1
Ошибка компиляции для платы Arduino Nano.

p.s тапками не кидайте, опыт с ардуино первый. В имеющейся инфе не нашел ответа.

Александр Симонов


  • #6

Спасибо, помогло.

Взял все три библиотеки оттуда (GyverButton, GyverHacks, GyverTimer).

p.s. а для CUBE_Gyver.ino запихать в одноименную папку .h и .cpp файл библиотеки GyverButton из архива со скетчами (со свежей версией скетч в ошибке).

Изменено: 5 Фев 2019

  • #7

Доброго дня. ничего не могу сделать. При компиляции выдает ошибку
exit status 1
‘GButton’ does not name a type
и подсвечена 38 строчка скетча.
GButton touch(BTN_PIN, LOW_PULL, NORM_OPEN);
Все делал по инструкции.
Может кто-то сталкивался с такой траблой?
и 70 строка
GButton touch(BTN_PIN, LOW_PULL, NORM_OPEN);

ошибка
exit status 1
‘LOW_PULL’ was not declared in this scope

Изменено: 10 Мар 2019

Александр Симонов


  • #8

Библиотека GyverButton не установлена

  • #9

Разобрался сам. в настройках Arduino IDE библиотека бралась не та, которая шла с проектом. Решение — удалил не нужную и ошибка пропала.
Спасибо!

  • #10

Создала проект, сейчас компилятор выводит ошибку. Помогите пожалуйста с этой проблемой, я новенькая в этом деле..

Вот:
In function ‘global constructors keyed to 65535_0_sketch_mar14a.ino.cpp.o’:

lto1.exe: internal compiler error: Segmentation fault

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

lto-wrapper.exe: fatal error: C:Program FilesWindowsAppsArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtthardwaretoolsavr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.19.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

exit status 1
Ошибка компиляции для платы Arduino/Genuino Uno.

Александр Симонов


Александр Симонов


  • #12

Ответ, оказывается, есть в гугле. Проблема именно в баге компилятора. Для решения:
1. установить последнюю версию Arduino IDE
2. В меню «Инструменты — Плата — Менеджер плат» найти Arduino AVR Boards, выбрать версию 1.6.21 и установить её.
1552649944200.png

be3um4wka


  • #13

Здравствуйте. Помогите пожалуйста! Хотел собрать в первый раз что-то на ардуино, решил сделать bluetooth матрицу с часами, но на плату не ставится код. Места хватает и драва под плату установил, проблема в чём-то другом. Заранее спасибо…
P.S. Плата не оригинальная. Заказывал с али. Её название: WAVGAT UNO R3.

Александр Симонов


  • #14

Какую конкретно ошибку выдает Arduino IDE при загрузке скетча?

be3um4wka


  • #15

Какую конкретно ошибку выдает Arduino IDE при загрузке скетча?

Ошибка конфигурации платы WAVGAT UNO R3

  • #16

Столкнулся с проблемой при компиляции версии 1.3 в плату (лог во вложении)
Версии 1.1 и 1.2 заливаются без проблем.
Версия софта 1.8.9
Плата Arduino Nano (из ссылки под видео).
В настройках выбираю чип: ATMega328 Старый загрузчик (пробовал и все остальные), плату: Arduino Nano
Пробовал отрубать библиотеки стандартные и брать только из папки с проектом (кроме FastLED-stm32patch — её в версию 1.3 не включено)

В версии 1.3 ошибка fillAll что конкретно правилось? по поиску исправлений не нашёл.

  • 2.9 KB
    Просмотры: 20

pavel lolkek


  • #17

Доброго времяни суток . Можете помочь не могу загрузить прошивку вылазиет такая ошибка :
Arduino: 1.6.5 (Windows 7), Плата»Arduino Nano, ATmega328″

colorMusic_v2.9.ino:195:50: fatal error: FHT.h: No such file or directory
compilation terminated.
Ошибка компиляции.

pavel lolkek


  • #19

прочитал . выбираю архив и выходит это :

Выбранная папка/zip файл не содержит корректных библиотек
Неверная библиотека найдена в C:UsersuserDocumentsArduinolibrariesColorMusic-master: нет заголовочных файлов (.h), найденных в C:UsersuserDocumentsArduinolibrariesColorMusic-master

  • #20

Здравствуйте не могу загрузить скетч в ардуино выдает такую ошибку
(Ошибка компиляции для платы Arduino Nano.
Неверная библиотека найдена в C:Program Files (x86)ArduinolibrariesDHT: нет заголовочных файлов (.h), найденных в C:Program Files (x86)ArduinolibrariesDHT
Неверная библиотека найдена в C:UsersuserDocumentsArduinolibrariessketch_nov30a: нет заголовочных файлов (.h), найденных в C:UsersuserDocumentsArduinolibrariessketch_nov30a) помогите кто чем может. С уважением ко Всем.

  • #21

@Максим3704, либо не та библиотека для датчика температуры. Либо не там лежит. У меня лежит в папке /мои документы /arduino ide /libraries

Библиотеки отличаются для одних и тех же датчиков. Сам перебрал кучу, пока нашёл нужную

be3um4wka


  • #22

Какую конкретно ошибку выдает Arduino IDE при загрузке скетча?

Arduino: 1.8.9 (Windows 10), Плата:"WAVGAT UNO R3"
Внимание: platform.txt из ядра 'Arduino AVR Boards' содержит устаревшие recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", автоматически преобразовано в recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Ожидайте обновления ядра.
In file included from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms/avr/fastled_avr.h:6:0,
                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms.h:27,
                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/FastLED.h:55,
                 from C:GyverMatrixOS_v1.11GyverMatrixOS_v1.11.ino:137:
C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms/avr/clockless_trinket.h:74:0: warning: "D1" redefined
#define D1(ADJ) DINT(T1,ADJ)
^
In file included from C:Program Files (x86)ArduinohardwareWAVavrvariantslgt8fx8p/pins_arduino.h:36:0,
                 from C:Program Files (x86)ArduinohardwareWAVavrcoreslgt8f/Arduino.h:225,
                 from sketchGyverMatrixOS_v1.11.ino.cpp:1:
c:program files (x86)arduinohardwarewavavrvariantsstandardpins_arduino.h:82:0: note: this is the location of the previous definition
#define D1 1 /* PD1 */
^
In file included from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms/avr/fastled_avr.h:6:0,
                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms.h:27,
                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/FastLED.h:55,
                 from C:GyverMatrixOS_v1.11GyverMatrixOS_v1.11.ino:137:

C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms/avr/clockless_trinket.h:75:0: warning: "D2" redefined

#define D2(ADJ) DINT(T2,ADJ)

^

In file included from C:Program Files (x86)ArduinohardwareWAVavrvariantslgt8fx8p/pins_arduino.h:36:0,

                 from C:Program Files (x86)ArduinohardwareWAVavrcoreslgt8f/Arduino.h:225,

                 from sketchGyverMatrixOS_v1.11.ino.cpp:1:

c:program files (x86)arduinohardwarewavavrvariantsstandardpins_arduino.h:83:0: note: this is the location of the previous definition

#define D2 2 /* PD2 */

^

In file included from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms/avr/fastled_avr.h:6:0,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms.h:27,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/FastLED.h:55,

                 from C:GyverMatrixOS_v1.11GyverMatrixOS_v1.11.ino:137:

C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/platforms/avr/clockless_trinket.h:76:0: warning: "D3" redefined

#define D3(ADJ) DINT(T3,ADJ)

^

In file included from C:Program Files (x86)ArduinohardwareWAVavrvariantslgt8fx8p/pins_arduino.h:36:0,

                 from C:Program Files (x86)ArduinohardwareWAVavrcoreslgt8f/Arduino.h:225,

                 from sketchGyverMatrixOS_v1.11.ino.cpp:1:

c:program files (x86)arduinohardwarewavavrvariantsstandardpins_arduino.h:84:0: note: this is the location of the previous definition

#define D3 3 /* PD3 */

^

In file included from C:GyverMatrixOS_v1.11GyverMatrixOS_v1.11.ino:137:0:

C:Program Files (x86)ArduinolibrariesFastLED-stm32patch/FastLED.h:17:21: note: #pragma message: FastLED version 3.002.000

#    pragma message "FastLED version 3.002.000"

                     ^

In file included from C:GyverMatrixOS_v1.11GyverMatrixOS_v1.11.ino:171:0:

sketchtimerMinim.h:10:23: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11

     uint32_t _timer = 0;

                       ^

sketchtimerMinim.h:11:26: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11

     uint32_t _interval = 0;

                          ^

C:GyverMatrixOS_v1.11g_tetris.ino:13:20: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11

uint32_t colors[6] {0x0000EE, 0xEE0000, 0x00EE00, 0x00EEEE, 0xEE00EE, 0xEEEE00};

                    ^

In file included from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms/avr/fastled_avr.h:6:0,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms.h:27,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.h:55,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.cpp:2:

C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms/avr/clockless_trinket.h:74:0: warning: "D1" redefined

#define D1(ADJ) DINT(T1,ADJ)

^

In file included from C:Program Files (x86)ArduinohardwareWAVavrvariantslgt8fx8p/pins_arduino.h:36:0,

                 from C:Program Files (x86)ArduinohardwareWAVavrcoreslgt8f/Arduino.h:225,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchled_sysdefs.h:38,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.h:44,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.cpp:2:

c:program files (x86)arduinohardwarewavavrvariantsstandardpins_arduino.h:82:0: note: this is the location of the previous definition

#define D1 1 /* PD1 */

^

In file included from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms/avr/fastled_avr.h:6:0,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms.h:27,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.h:55,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.cpp:2:

C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms/avr/clockless_trinket.h:75:0: warning: "D2" redefined

#define D2(ADJ) DINT(T2,ADJ)

^

In file included from C:Program Files (x86)ArduinohardwareWAVavrvariantslgt8fx8p/pins_arduino.h:36:0,

                 from C:Program Files (x86)ArduinohardwareWAVavrcoreslgt8f/Arduino.h:225,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchled_sysdefs.h:38,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.h:44,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.cpp:2:

c:program files (x86)arduinohardwarewavavrvariantsstandardpins_arduino.h:83:0: note: this is the location of the previous definition

#define D2 2 /* PD2 */

^

In file included from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms/avr/fastled_avr.h:6:0,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms.h:27,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.h:55,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.cpp:2:

C:Program Files (x86)ArduinolibrariesFastLED-stm32patchplatforms/avr/clockless_trinket.h:76:0: warning: "D3" redefined

#define D3(ADJ) DINT(T3,ADJ)

^

In file included from C:Program Files (x86)ArduinohardwareWAVavrvariantslgt8fx8p/pins_arduino.h:36:0,

                 from C:Program Files (x86)ArduinohardwareWAVavrcoreslgt8f/Arduino.h:225,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchled_sysdefs.h:38,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.h:44,

                 from C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.cpp:2:

c:program files (x86)arduinohardwarewavavrvariantsstandardpins_arduino.h:84:0: note: this is the location of the previous definition

#define D3 3 /* PD3 */

^

C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.cpp: In member function 'void CFastLED::delay(long unsigned int)':

C:Program Files (x86)ArduinolibrariesFastLED-stm32patchFastLED.cpp:132:9: error: 'yield' was not declared in this scope

   yield();

         ^

exit status 1

Ошибка компиляции для платы WAVGAT UNO R3.



Этот отчёт будет иметь больше информации с

включенной опцией Файл -> Настройки ->

"Показать подробный вывод во время компиляции"

Изменено: 16 Апр 2019

Wan-Derer


  • #23

@be3um4wka, Дай ссылку на свою плату или сделай фото, крупно чтобы читались все надписи на микросхемах

  • #24

Чтото не заработал полив, собрал все по схеме, вкл через малый промежуток времени, ставил на часа два, три и нивкакую. похоже библиотека всему виной наверно не туда сохранил или еще что, выбивало ошибку Неверная библиотека найдена в C:Program Files (x86)Arduinolibrarieslibraries: нет заголовочных файлов (.h), найденных в C:Program Files (x86)

  • #25

Arduino: 1.6.5 (Windows 7), Плата»Arduino Nano, ATmega328″

In file included from colorMusic_v2.7_Effect_Mic_and_Line.ino:236:0:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRLremote.h:29:2: error: #error IRLremote requires Arduino IDE 1.6.6 or greater. Please update your IDE.
#error IRLremote requires Arduino IDE 1.6.6 or greater. Please update your IDE.
^
In file included from colorMusic_v2.7_Effect_Mic_and_Line.ino:227:0:
C:Program Files (x86)ArduinolibrariesFastLED-master/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008
# pragma message «FastLED version 3.001.008»
^
In file included from C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Nec.h:28:0,
from C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRLremote.h:44,
from colorMusic_v2.7_Effect_Mic_and_Line.ino:236:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Time.h: In member function ‘uint32_t CIRL_Time<T>::nextEvent()’:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Time.h:135:10: error: ‘time’ does not name a type
auto time = timeout();
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Time.h:136:10: error: ‘timespan’ does not name a type
auto timespan = static_cast<T*>(this)->timespanEvent;
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Time.h:138:8: error: ‘time’ was not declared in this scope
if(time >= timespan) {
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Time.h:138:16: error: ‘timespan’ was not declared in this scope
if(time >= timespan) {
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Time.h:142:12: error: ‘timespan’ was not declared in this scope
return timespan — time;
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Time.h:142:23: error: ‘time’ was not declared in this scope
return timespan — time;
^
In file included from C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Nec.h:30:0,
from C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRLremote.h:44,
from colorMusic_v2.7_Effect_Mic_and_Line.ino:236:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Decode.h: In static member function ‘static void CIRL_DecodeSpaces<T, blocks>::interrupt()’:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Decode.h:100:10: error: ‘duration’ does not name a type
auto duration = T::nextTime();
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Decode.h:103:9: error: ‘duration’ was not declared in this scope
if (duration >= T::limitTimeout) {
^
In file included from C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRLremote.h:45:0,
from colorMusic_v2.7_Effect_Mic_and_Line.ino:236:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h: In member function ‘void CNecAPI<callback, address>::read()’:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:72:8: error: ‘data’ does not name a type
auto data = CNec::read();
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:75:28: error: request for member ‘address’ in ‘CIRL_DecodeSpaces<CNec, 4>::data’, which is of non-class type ‘uint8_t [4] {aka unsigned char [4]}’
bool firstCommand = data.address != 0xFFFF;
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:76:13: error: request for member ‘address’ in ‘CIRL_DecodeSpaces<CNec, 4>::data’, which is of non-class type ‘uint8_t [4] {aka unsigned char [4]}’
if ((data.address == 0) || (address && firstCommand && (data.address != address)))
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:76:64: error: request for member ‘address’ in ‘CIRL_DecodeSpaces<CNec, 4>::data’, which is of non-class type ‘uint8_t [4] {aka unsigned char [4]}’
if ((data.address == 0) || (address && firstCommand && (data.address != address)))
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:96:14: error: request for member ‘command’ in ‘CIRL_DecodeSpaces<CNec, 4>::data’, which is of non-class type ‘uint8_t [4] {aka unsigned char [4]}’
if (data.command == lastCommand)
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:124:24: error: request for member ‘command’ in ‘CIRL_DecodeSpaces<CNec, 4>::data’, which is of non-class type ‘uint8_t [4] {aka unsigned char [4]}’
lastCommand = data.command;
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h: In member function ‘uint32_t CNecAPI<callback, address>::nextTimeout()’:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:205:10: error: ‘time’ does not name a type
auto time = timeout();
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:206:10: error: ‘timeout’ does not name a type
auto timeout = getTimeout();
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:208:8: error: ‘time’ was not declared in this scope
if(time >= timeout) {
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_NecAPI.h:212:22: error: ‘time’ was not declared in this scope
return timeout — time;
^
In file included from C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRLremote.h:47:0,
from colorMusic_v2.7_Effect_Mic_and_Line.ino:236:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Hash.h: In static member function ‘static void CHashIR::interrupt()’:
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Hash.h:180:10: error: ‘duration’ does not name a type
auto duration = nextTime();
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Hash.h:183:8: error: ‘duration’ was not declared in this scope
if(duration >= HASHIR_TIMEOUT)
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Hash.h:213:18: error: ‘oldval’ does not name a type
auto oldval = lastDuration;
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Hash.h:214:18: error: ‘newval’ does not name a type
auto newval = duration;
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Hash.h:220:17: error: ‘newval’ was not declared in this scope
if (newval < (oldval * 3 / 4)) {
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Hash.h:220:27: error: ‘oldval’ was not declared in this scope
if (newval < (oldval * 3 / 4)) {
^
C:Program Files (x86)ArduinolibrariesIRLremote-mastersrc/IRL_Hash.h:240:28: error: ‘duration’ was not declared in this scope
lastDuration = duration;
^
colorMusic_v2.7_Effect_Mic_and_Line.ino: In function ‘void remoteTick()’:
colorMusic_v2.7_Effect_Mic_and_Line:848: error: ‘data’ does not name a type
colorMusic_v2.7_Effect_Mic_and_Line:849: error: ‘data’ was not declared in this scope
‘data’ does not name a type

WARNING: Spurious .github folder in ‘Adafruit NeoPixel’ library

WARNING: Spurious .github folder in ‘Adafruit NeoPixel’ library

Это сообщение будет содержать больше информации чем
«Отображать вывод во время компиляции»
включено в Файл > Настройки


13-12-2020, 16:31
6 комментариев

Даже опытные программисты-«ардуинщики» могут столкнуться с ошибками компиляции. Исправить их не сложно, а вот найти порой не так просто. Мы решили рассказать сегодня в деталях, какие системные ошибки чаще возникают на различных платах Ардуино, как их исправить и по возможности избежать. 

Для начала рассмотрим базовые, так называемые синтаксические ошибки. Они встречаются чаще всего у новичков, но и опытные электронщики с ними точно знакомы не понаслышке. Искать их обычно супер-просто – в Arduino IDE некорректный синтаксис выделяется построчно (таким образом значительно легче отыскать неточность в кодах). Обычно это: отсутствие скобки в конце команды, пропуск этой самой служебной команды или слова, нехватка важных функций, неправильное их написание и т.д.

Для быстрого поиска ошибки советуем рассмотреть строку-подсказку. Ничего не помогло? Тогда для вас наша подборка наиболее распространенных синтаксических ошибок:

С синтаксисом все понятно – вставляем пропущенные символы, убираем лишние знаки, возвращаем функции по умолчанию.
Напомним, в среде разработки Ардуино IDE можно заливать скетчи для различных микроконтроллеров. По умолчанию обычно указана плата Genuino Uno. Если вы работаете с Mega, следует выбрать именно эту платформу (меню «Сервис»), иначе вас ожидает неприятное предупреждение: “programmer is not responding”.

Ошибка компиляции для платы Arduino Uno чаще всего возникает из-за проблем, связанных с библиотеками, например, неправильно подключили, не то ПО инсталлировали. В этом случае вы увидите напоминание fatal error: … No such file or directory” (библиотека не перенесена в папку libraries) или redefinition of void setup”.


Обозначенная на скриншоте ERROR означает, что программирование завершилось некорректно (расшифровываем: внутренние проблемы с компилятором, не обновили версию IDE, сбой в библиотеке, неправильный выбор разрядности операционной системы и др.). 
Важно! Не забывайте использовать подсказки приложения – они очень помогают. Включаем тут: Файл -> Настройки -> «Показать подробный вывод во время компиляции».

Что делать, если произошла ошибка при загрузке скетча Arduino Nano. Тут могут быть те же причины, что мы описали выше. Особых отличий в компиляции плат нет, главное, их правильный выбор первоначально. Однако часто пользователи настраивают не те показатели скорости порта: 9600 вместо необходимых 57600 либо не имеют соответствующих драйверов на устройствах – все это нужно проверить и исправить!

It’s 11 PM on a Wednesday. You’ve just spent three hours toiling on your next Arduino project, and FINALLY, you’re ready to give your sketch a whirl. You hit upload, palms sweaty with anticipation to see all your hard work come to fruition. It’s then you see the error:

No such file or directory.

Surely this is a chance aberration. “Nothing to worry about,” you mutter, sleep-starved and semi-delirious as you hit upload again. And once more, those maddening words, “no such file or directory,” stare back at you in hostile gaslighting mockery.

Have you been here?

If you’re trying to run an Arduino sketch but keep coming across the “no such file or directory” error, don’t worry. This is actually a pretty common problem, and there are two easy fixes that almost always work.

Keep on reading. We’ll show you what they are.

No such file error!

Error messages can be such a pain. They do, however, serve a useful purpose by telling us something about what went wrong. At first glance, the no such file or directory error is particularly maddening because it seems to break that useful purpose rule. Of course there’s a file or directory! You just made the thing, and it’s right there, tucked inside a directory.

But hold up, let’s take a closer look. If you look at the bottom portion of the Arduino IDE where the error message shows up, there’s this handy little button that says “copy error messages.”

Click on that now. You probably won’t fall off your chair to learn that by clicking that button, you just copied the error message from the little window at the bottom of The Serial Monitor’s UI to the clipboard of your computer.

This copy feature is ridiculously useful. You could, for example, paste the error message into Google and learn more about the error. Or you could take advantage of the active Arduino community by asking for help in a forum. For this situation, however, we can be a bit more basic. All we’re going to do is take a closer look at what the message is actually saying. To do that, just fire up your PC’s text editor and paste it into the blank screen.

Decoding the no such file error

Here it is, that pesky error in all its freshly pasted glory.

no such file error printed out on Arduino IDE error section

I’ll break it down for you line by line.

  • The first line is easy. It’s just describing the Arduino version in use, what operating system is running, and which board you have selected.
  • Line 2 begins to zero in on the problem.
    • The first bit, “knob,” is referring to the name of the program. This is your sketch, basically.
    • The second bit is what usually begins to confuse people, but it’s easy once you know. The “10” in this example is telling you the error occurred on line 10 of your sketch. The “19” is telling you the length of the line of code in spaces and characters. The first number is usually the more helpful of the two because you can use it to locate the error in your sketch.
  • Then we get to the smoking gun of the error. It says, “servo.h: No such file or directory”.

So this thing, “Servo.h.” That’s the thing we need to fix, and thanks to line 2, we know where to find it. Line 10. It’s always line 10.

Now that we know what’s going on a bit better, let’s get down to the business of implementing a fix.

The error of our ways

Let’s lay down some scrutiny on this accursed line 10.

It says “#include <servo.h>”

When we verify this code, this line is telling the Arduino IDE compiler, “Hey, for this program to work, you need to go get this file called servo.h”.

Let’s say you had a label-making machine, and you wanted to use it to print some cool motivational labels, like “Success!” and “Keep Trying!” and “Look, Nachos!” To make that happen, you’ll first have to load in a roll of labels. No roll of labels? Well, then the label maker isn’t gonna work.

The sketch you’re trying to upload is like the label maker. The file (in our example, the file named “servo.h”) is the roll of labels.

So the error message actually is saying something useful. It’s saying, “Hey programmer, you said I needed this other file. Well, I looked for it and it’s not there. What gives?”

Now we know the error message isn’t complete gibberish, let’s look at the two most common scenarios that cause it.

Scenario 1 – Fat fingers

This sketch is one that you’ve written. You’re actually the one who wrote the “#include” line. The first thing you should check is your spelling and capitalization. Maybe you spelled the name of the library incorrectly? Or (as with the example below) perhaps you capitalized the wrong letters.

Arduino IDE with misspelled library name, which can create the no such file error

So “servo.h” should actually have a capital “S.” In full and with correct capitalization, it should read, “Servo.h.” You’ll notice above that the word servo changes color when it’s correctly capitalized. That color change signifies that the library name “Servo” is recognized as a “keyword” in the Arduino IDE.

Keep in mind that might not be the case for all the libraries you’re using. In other words, the color change won’t always indicate you’re using the right spelling or capitalization, but it’s often a helpful visual reminder.

Oh, and it’s probably good to mention that everyone in the history of Arduino programming has misspelled or incorrectly capitalized a word at some point. It’s amazing how long you can stare at a line of code and miss something like that.

So don’t sweat it.

Scenario 2 – Missing files

This brings us to the next common scenario for the “no such file or directory” error.

So often, working with Arduinos involves taking code that someone else has developed and shared online and then tailoring it to your project. That’s part of what makes it so easy to get stuff done with Arduino. One problem that frequently happens when we do that, however, is we accidentally introduce code without a matching file.

An easy way to check to see if you have the file a sketch is looking for is to navigate to Sketch > Include Library from within the Arduino IDE. Then look for the name of that library.

Arduino IDE library dropdown - if library is not included, the the no such file error will show up

Whatever library the #include statement was calling for, you want to look through this big long list for a library with the exact same name. If you don’t see the file name there, this means the library isn’t installed. You’ll have to add that library before the sketch will compile without errors.

So, how do you add that library?

The easiest way is to go to Sketch > Include Library > Manage Libraries. The Arduino IDE will open up a dialogue box from which you can search for the library you need.

Make sure you type the exact word that matches the #include line. Once you find the missing library, go ahead and click Install. The Arduino IDE will let you know that it’s installing the library you requested and updating the software accordingly.

Next, just double-check that the library has been successfully installed by going to Sketch > Include Library. You should see your new library in the dropdown list.

Good news! If the library is there, you should now be able to compile your sketch error-free.

Other library locations

OK, there’s one little fly in the ointment. How do these dang ointment flies always manage to complicate things so?

Here’s the thing. Not all libraries live in this convenient pop-up window inside the Arduino IDE. The Arduino community is bubbling with clever ideas, but cleverness (unlike processed cheese) doesn’t always come in conveniently standardized, individually wrapped slices. There are tons of different ways to find Arduino libraries on the web.

If you’re downloading or copying a program from the internet, just go to the page where you got that program and take a close look at the library the author is referencing. They may, for example, have a link to GitHub, which is a place where people keep a lot of code libraries.

Wherever you find it, usually the library will be included in a .zip file package. Once you’ve downloaded the .zip file, fire up the Arduino IDE and go to Sketch > Include Library > Add .ZIP library. Then navigate to the location you downloaded the file and select it. Assuming no additional ointment flies invade your workflow, the Arduino IDE will pop up the message “Library added to your libraries” just above the dark area where the original “no such file or directory” error appeared.

Now it’s business as usual! Just go to Sketch > Include Library, and the new library will appear in the drop-down list.

As the dyslexic Frenchman once said to the oversized violinist: “Viola!”

You now know not one but two ways to add a new library. What a time to be alive!

Review

A quick recap, then.

We’ve looked at the two main scenarios that cause the “no such file or directory” error to appear after you compile your sketch:

  • The fat fingers phenomenon: Check your spelling and capitalization! If you wrote the sketch, there’s a mighty good chance you introduced a tiny error. And don’t beat yourself up over it! Literally every coder has done this.
  • The missing files mixup: Failing that, if you copied code from someone else check that you have the correct libraries installed. Don’t see your library? Install it using the method described above, and you should be good to go.

There may be no such thing as a free lunch, a coincidence, or a luck dragon. But rest assured. Your files and directories? They’re alive and well.

Понравилась статья? Поделить с друзьями:
  • No selection available ошибка на ауди а6 с6
  • No rule to make target needed by stop ошибка
  • No row was updated sql ошибка
  • No ride height man ошибка
  • No response seen to icmp request ошибка