Can't include <I2S.h> on ESP32 on neither VSCode PIO nor Arduino IDE

843 views Asked by At

I've tried to get my ESP32 LOLIN32 with Arduino framework working, but I can't even upload code to it. I'm including nothing but Arduino and I2S but it doesn't understand what I mean with I2S. I have only written:

#include <I2S.h>
#include <Arduino.h>

void setup(){

}

void loop(){

}

but it fails to compile and gives:

src\main.cpp:1:17: fatal error: I2S.h: No such file or directory
*************************************************************     
* Looking for I2S.h dependency? Check our library registry!       
*
* CLI  > platformio lib search "header:I2S.h"
* Web  > https://registry.platformio.org/search?q=header:I2S.h    
*
*************************************************************

Arduino IDE can't find it eather, I get the same error.

I've tried adding build_flags = -I and lib_deps in platform.ini:

[env:lolin32]
platform = espressif32
board = lolin32
framework = arduino
build_flags = -I include
lib_deps = 
    I2S

to no avail.

1

There are 1 answers

0
Tomáš Viks Pilný On

I2S.h was added to arduino-esp32 from version 2.0.3-RC1. The OP does not describe the used version, but I guess it is older than the mentioned 2.0.3

I suggest updating arduino-esp32