Open parlotto opened 1 year ago
Sorry, I was using arduino 1.8. It works on arduino 2.0.3 by simply a #include
Nothing special for Platformio. This works.
#include <Arduino.h>
#include <dsps_biquad_gen.h>
void setup() {
Serial.begin(115200);
float coeffs[15]={0},f=0.4,qFactor=4;
dsps_biquad_gen_lpf_f32(coeffs, f, qFactor);
for (int i=0;i<15;i++){
Serial.printf("%f \n",coeffs[i]);
}
}
void loop() {
}
in Platformio I still have an error :
src/main.cpp:3:29: fatal error: dsps_biquad_gen.h: No such file or directory
platformio.ini content is :
[env:lolin_d32] platform = https://github.com/platformio/platform-espressif32.git board = lolin_d32 framework = arduino monitor_speed = 115200 monitor_filters = esp32_exception_decoder arduino-esp32.gitframework = arduino
Try this environment: [env:lolin_d32_test] board = lolin_d32 monitor_speed = 115200 platform = espressif32 framework = arduino monitor_filters = esp32_exception_decoder
Also try closing and reopening VSCode. PIO manages the include paths for VSCode, but sometimes it takes reopening VSCode for them to be fixed.
Same error with this environment even after restarting VSCode. thank you for you help
The following compiles for me.
platformio.ini
[env:lolin_d32_test]
board = lolin_d32
monitor_speed = 115200
platform = espressif32
framework = arduino
monitor_filters = esp32_exception_decoder
main.cpp
#include <Arduino.h>
#include "dsps_biquad_gen.h"
void setup() {
Serial.begin(115200);
float coeffs[15]={0},f=0.4,qFactor=4;
dsps_biquad_gen_lpf_f32(coeffs, f, qFactor);
for (int i=0;i<15;i++){
Serial.printf("%f \n",coeffs[i]);
}
}
void loop() {
}
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 4.3% (used 13944 bytes from 327680 bytes)
Flash: [= ] 11.0% (used 144777 bytes from 1310720 bytes)
Building .pio\build\lolin_d32_test\firmware.bin
esptool.py v4.3
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
Board
ESP32 dev module
Device Description
esp32 dev module alone
Hardware Configuration
nothing connected
Version
v2.0.6
IDE Name
Arduino IDE , platformIO
Operating System
linux
Flash frequency
80 MHz
PSRAM enabled
yes
Upload speed
921600
Description
How to correctly include esp-dsp header files in a sktech ? They are in the directory tools/sdk/esp32/include/esp-dsp/modules/iir/include/... but I can't find a way to correctly include them in a sketch. Pointing the absolute location on my disk seams to work but It is not a portable solution.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide