Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Is it possible to use ESP-DSP in Arduino for ESP32? #11

Closed
ohnoitsalobo opened this issue Feb 1, 2020 · 9 comments
Closed

Comments

@ohnoitsalobo
Copy link

ohnoitsalobo commented Feb 1, 2020

My questions:

  1. is it possible to use ESP-DSP in Arduino code, similar to other ESP-IDF code?
  2. if yes, can you make a basic example I could follow?

Hello, I have made a working spectrum analyzer using ArduinoFFT (link) which is obviously not optimized for ESP32. Similar to this man's work. In my case I use it to drive an LED strip.

I generally do not use ESP-IDF as it is very confusing for me, however I am aware that some ESP-IDF functions are still accessible in the arduinoespressif32 framework. Is this possible with ESP-DSP?

I am actually attempting to use it right now, but as I am not a professional programmer my progress is very slow. A lot of compiler errors and definition errors etc. It will probably take me a week to do (badly) what you can do (properly) in an hour. So my request is: can you make an example using ESP-DSP FFT in Arduino? Similar to this ArduinoFFT example, reading values from an analog pin and running FFT on them.

Context: the ESP32 dev boards I bought are defective, locked at 160MHz from the factory. If the ESP-DSP code offers a performance boost that would be great.
I use arduinoespressif32 framework in PlatformIO compiler, if that makes a difference.

@ohnoitsalobo ohnoitsalobo changed the title Possible to use ESP-DSP in Arduino for ESP32? Request: Is it possible to use ESP-DSP in Arduino for ESP32? Feb 1, 2020
@rtufino
Copy link

rtufino commented May 10, 2020

Hi. Can you solve this?

@ohnoitsalobo
Copy link
Author

I wasn't able to get it to work.
Hoping someone smarter than me weighs in eventually.

@hamuro80
Copy link

I can use esp dsp under esp-isd with arduino as a component, but can't use it under arduino ide. I think someone should port the esp-dsp component to arduino library, any clue how to start?

@standarddeviant
Copy link

Is a PlatformIO project configured to use the Arduino framework a suitable solution? Their build flags system is flexible which helps. I think I've done this before and I'll post an example if I can confirm that I have it working.

@standarddeviant
Copy link

standarddeviant commented Oct 29, 2020

It's clunky, but have a look at this example that uses the biquad assembly function:
https://github.com/standarddeviant/Demo_ESP32_PlatformIO_Arduino_ESPDSP

That repo builds for me. I moved source files in to lib/esp-dsp-pio/src and header files to lib/esp-dsp-pio/include.

Some of the FFT source/header files have issues with how they define some const arrays. You should be able to use ESP-DSP's FFT functions, but it will probably require some minor modifications of the FFT functions. I'll add to that repo and try to add the FFT functions.

@michikite
Copy link

you can use platformIO and build with both esp-idf and Arduino. The component is placed in a 'components' folder.
Just tried that with dotprod example and it works fine.

Example settings:

platformio.ini

[env]
platform = espressif32
framework = 
	arduino
	espidf
monitor_speed = 115200
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.0

CMakeLists.txt

cmake_minimum_required(VERSION 3.16.0)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
list(APPEND EXTRA_COMPONENT_DIRS esp-dsp)
project(espidf-arduino-example)

@me-no-dev
Copy link
Member

it's coming in Arduino 2.0.0

@kylongmu
Copy link

kylongmu commented Apr 3, 2021

it's coming in Arduino 2.0.0

Where can see the message with Arduino 2.0 ?

@igrr
Copy link
Member

igrr commented Mar 7, 2022

esp-dsp has been added to arduino-esp32, so I'm going to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants