Unable to resolve this error

Arduino: 1.8.13 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 921600, None"

C:\Users--\Documents\Arduino\libraries\Filters-master\FilterTwoPole.cpp: In member function 'void FilterTwoPole::test()':

C:\Users-----\Documents\Arduino\libraries\Filters-master\FilterTwoPole.cpp:198:33: error: 'analogWrite' was not declared in this scope

analogWrite(10,osc.output() ); // hardcoded the dial pin

^

Multiple libraries were found for "WiFi.h"

Used: C:\Users\Shubh\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi

Not used: C:\Users\Shubh\Documents\Arduino\libraries\WiFi-master

Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

exit status 1

Error compiling for board DOIT ESP32 DEVKIT V1.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

What data type does the osc.output() function return. The analogWrite() function expects a byte.

Is analogWrite() natively supported for ESP32?

Have you installed a library such as GitHub - ERROPiX/ESP32_AnalogWrite: Provides an analogWrite polyfill for ESP32 using the LEDC functions?

Unfortunately, the ESP32 core authors never added an analogWrite() function. I think Blackfin's suggestion of using a 3rd party library is the best approach.

You can find some other options by reading this feature request thread:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.