noise is corrected to nice ?

DutchOrange
Posts: 74
Joined: Fri Dec 04, 2020 4:23 pm

noise is corrected to nice ?

Postby DutchOrange » Tue Jun 29, 2021 5:53 pm

So I was trying to use the noise function form FastLED. Here is my code
This is ESP-IDF 4.2
On a Windows machine

Code: Select all

#include "mdf_common.h"
#include "mwifi.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <stdio.h>

#include <led_strip.h> 
#include <noise.h> 
void app_main(void)
{
    while(1){
         noise(5,7);
        //printf("Hello world  %f \n", noise_values);
        vTaskDelay(1000 / portTICK_RATE_MS); 
    }
}
But when I run this code I get the error of:

Code: Select all

../main/buzzer.c:38:10: error: implicit declaration of function 'noise'; did you mean 'nice'? [-Werror=implicit-function-declaration]
          noise(5,7);
          ^~~~~
          nice
cc1.exe: some warnings being treated as errors
[13/20] Performing build step for 'bootloader'
[0/1] Re-running CMake...
CMake Warning at D:/ESP-MDF/esp-mdf/esp-idf/tools/cmake/idf.cmake:18 (message):
  IDF_PATH environment variable is different from inferred IDF_PATH.

                              Check if your project's top-level CMakeLists.txt includes the right
                              CMake files. Environment IDF_PATH will be used for the build:
                              D:/ESP-IDF
Call Stack (most recent call first):
  D:/ESP-MDF/esp-mdf/esp-idf/tools/cmake/project.cmake:7 (include)
  CMakeLists.txt:20 (include)
Any ideas why ?
Thanks for any help.

Stephan
Posts: 12
Joined: Tue Aug 27, 2019 2:42 am

Re: noise is corrected to nice ?

Postby Stephan » Tue Jun 29, 2021 10:05 pm

Because there is no function "noise()" declared in noise.h. Therefore, the symbol noise() is unknown. See the available functions in https://github.com/hpwit/fastled-esp32- ... er/noise.h Depending on what you want to achieve, pick one of these functions. This has nothing to do with IDF 4.2 or Espressif in general. It is a general C question.

DutchOrange
Posts: 74
Joined: Fri Dec 04, 2020 4:23 pm

Re: noise is corrected to nice ?

Postby DutchOrange » Wed Jun 30, 2021 1:25 pm

Thanks, found out this morning of my stupid mistake,
Corrected it to

Code: Select all

inoise8_2d()

Who is online

Users browsing this forum: No registered users and 351 guests