Содержание
- AsyncTCP.h: No such file or directory, call of overloaded ‘setup(int&)’ is ambiguous #523
- Comments
- [BUG] (bugfix-2.0.x) Compile fail with ESP3D_WIFISUPPORT enabled #18789
- Comments
- Bug Description
- My Configurations
- Steps to Reproduce
- Additional Information
AsyncTCP.h: No such file or directory, call of overloaded ‘setup(int&)’ is ambiguous #523
I’m using ESP32 Firebeetle on Windows 10 (build 17134.765) with arduino 1.8.9 (windows store 1.8.21.0)
having trouble getting ESPAsyncWebServer to work. appears to need AsyncTCP-master installed as well, but still giving me problems.
pity as I liked the example code I found, tidier than alternative methods running webserver on the ESP32.
attempted to install using arduino library manager ie: arduino > menu > sketch > include library > manage libraries > search for ESPAsyncWebServer
this found PathVariableHandlers which claims to be compatible with ESPAsyncWebServer for ESP32 & ESP8266WebServer for ESP8266.
https://github.com/sidoh/path_variable_handlers
above does not solve the «ESPAsyncWebServer.h: No such file or directory»
a search for ESPAsyncWebServer.h found
https://github.com/me-no-dev/ESPAsyncWebServer
downloaded the zip file, unzipped to blah/Aarduino/libraries
compile produced
ESPAsyncWebServer.h:33:22: fatal error: AsyncTCP.h: No such file or directory
found this repo > https://github.com/me-no-dev/AsyncTCP
downloaded the zip file and unzipped to blah/Aarduino/libraries
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: «FireBeetle-ESP32, 80MHz, 115200»
D:2018_workingcodingarduinoJune2019dht22_chartdht22_chart.ino: In function ‘void setup()’:
dht22_chart:25:19: error: call of overloaded ‘setup(int&)’ is ambiguous
dht.setup(dhtPin);
^
In file included from blaharduinoJune2019dht22_chartdht22_chart.ino:12:0:
blahArduinolibrariesDHT_sensor_library_for_ESPx/DHTesp.h:125:8: note: candidate: void DHTesp::setup(uint8_t)
void setup(uint8_t dhtPin) attribute((deprecated));
blahArduinolibrariesDHT_sensor_library_for_ESPx/DHTesp.h:126:8: note: candidate: void DHTesp::setup(uint8_t, DHTesp::DHT_MODEL_t)
void setup(uint8_t pin, DHT_MODEL_t model=AUTO_DETECT);
The text was updated successfully, but these errors were encountered:
Источник
[BUG] (bugfix-2.0.x) Compile fail with ESP3D_WIFISUPPORT enabled #18789
Bug Description
As of recently Marlin does not compile with ESP3D_WIFISUPPORT defined in Configuration_adv.h; upon failure it prints the message fatal error: ESPAsyncTCP.h: No such file or directory .
My Configurations
Configuration is completely default except for the aforementioned single change, fresh from bugfix-2.0.x branch. If needed a fork is here.
Steps to Reproduce
Besides compiling with the single change, nothing else has to be done to reproduce the issue.
Actual behavior:
PIO task build terminal output
soft Found 10 compatible libraries Scanning dependencies. Dependency Graph |— 1.2.3 |— 1.0.0 #fd0f7b6 | |— 1.1.0 #36420ca | |— 2.2.1 #b3c5348 | | |— 1.0 |— 2.2.1 #b3c5348 | |— 1.0 |— 1.1.0 #36420ca |— 1.0 |— 1.0 |— 2.0 |— 1.0 Building in release mode Compiling .piobuildmega2560srcsrcHALAVRHAL.cpp.o Compiling .piobuildmega2560srcsrcHALAVRHAL_SPI.cpp.o Compiling .piobuildmega2560srcsrcHALAVRMarlinSerial.cpp.o Compiling .piobuildmega2560srcsrcHALAVRServo.cpp.o Compiling .piobuildmega2560srcsrcHALAVReeprom.cpp.o Compiling .piobuildmega2560srcsrcHALAVRfast_pwm.cpp.o Compiling .piobuildmega2560srcsrcHALAVRfastio.cpp.o Compiling .piobuildmega2560srcsrcHALAVRu8g_com_HAL_AVR_sw_spi.cpp.o Compiling .piobuildmega2560srcsrcHALAVRwatchdog.cpp.o Compiling .piobuildmega2560srcsrcHALsharedHAL_spi_L6470.cpp.o Compiling .piobuildmega2560srcsrcHALsharedbacktracebacktrace.cpp.o Compiling .piobuildmega2560srcsrcHALsharedbacktraceunwarm.cpp.o Compiling .piobuildmega2560srcsrcHALsharedbacktraceunwarm_arm.cpp.o Compiling .piobuildmega2560srcsrcHALsharedbacktraceunwarm_thumb.cpp.o Compiling .piobuildmega2560srcsrcHALsharedbacktraceunwarmbytab.cpp.o Compiling .piobuildmega2560srcsrcHALsharedbacktraceunwarmmem.cpp.o Compiling .piobuildmega2560srcsrcHALsharedbacktraceunwinder.cpp.o Compiling .piobuildmega2560srcsrcHALsharedbacktraceunwmemaccess.cpp.o Compiling .piobuildmega2560srcsrcHALsharedeeprom_api.cpp.o Compiling .piobuildmega2560srcsrcHALsharedeeprom_if_i2c.cpp.o Compiling .piobuildmega2560srcsrcHALsharedeeprom_if_spi.cpp.o Compiling .piobuildmega2560srcsrcHALsharedesp_wifi.cpp.o Compiling .piobuildmega2560srcsrcHALsharedservo.cpp.o Compiling .piobuildmega2560srcsrcMarlinCore.cpp.o Compiling .piobuildmega2560srcsrccoremulti_language.cpp.o Compiling .piobuildmega2560srcsrccoreserial.cpp.o Compiling .piobuildmega2560srcsrccoreutility.cpp.o Compiling .piobuildmega2560srcsrcfeaturebabystep.cpp.o Compiling .piobuildmega2560srcsrcfeaturebacklash.cpp.o Compiling .piobuildmega2560srcsrcfeaturebaricuda.cpp.o Compiling .piobuildmega2560srcsrcfeaturebedlevelbedlevel.cpp.o Compiling .piobuildmega2560srcsrcfeaturebinary_protocol.cpp.o Compiling .piobuildmega2560srcsrcfeaturebltouch.cpp.o Compiling .piobuildmega2560srcsrcfeaturecancel_object.cpp.o Compiling .piobuildmega2560srcsrcfeaturecaselight.cpp.o Compiling .piobuildmega2560srcsrcfeatureclosedloop.cpp.o Compiling .piobuildmega2560srcsrcfeaturecontrollerfan.cpp.o Compiling .piobuildmega2560srcsrcfeaturedirect_stepping.cpp.o Compiling .piobuildmega2560srcsrcfeaturee_parser.cpp.o Compiling .piobuildmega2560srcsrcfeatureencoder_i2c.cpp.o Compiling .piobuildmega2560srcsrcfeaturefanmux.cpp.o Compiling .piobuildmega2560srcsrcfeaturefilwidth.cpp.o Compiling .piobuildmega2560srcsrcfeaturefwretract.cpp.o Compiling .piobuildmega2560srcsrcfeaturehost_actions.cpp.o Compiling .piobuildmega2560srcsrcfeaturehotend_idle.cpp.o Compiling .piobuildmega2560srcsrcfeaturejoystick.cpp.o Compiling .piobuildmega2560srcsrcfeaturemax7219.cpp.o Compiling .piobuildmega2560srcsrcfeaturemixing.cpp.o Compiling .piobuildmega2560srcsrcfeaturemmu2mmu2.cpp.o Compiling .piobuildmega2560srcsrcfeaturepause.cpp.o Compiling .piobuildmega2560srcsrcfeaturepower.cpp.o Compiling .piobuildmega2560srcsrcfeaturepower_monitor.cpp.o Compiling .piobuildmega2560srcsrcfeaturepowerloss.cpp.o Compiling .piobuildmega2560srcsrcfeatureprobe_temp_comp.cpp.o Compiling .piobuildmega2560srcsrcfeaturerunout.cpp.o Compiling .piobuildmega2560srcsrcfeaturesnmm.cpp.o Compiling .piobuildmega2560srcsrcfeaturesolenoid.cpp.o Compiling .piobuildmega2560srcsrcfeaturespindle_laser.cpp.o Compiling .piobuildmega2560srcsrcfeaturetmc_util.cpp.o Compiling .piobuildmega2560srcsrcfeaturetouchxpt2046.cpp.o Compiling .piobuildmega2560srcsrcfeaturetwibus.cpp.o Compiling .piobuildmega2560srcsrcfeaturez_stepper_align.cpp.o Compiling .piobuildmega2560srcsrcgcodebedlevelG26.cpp.o Compiling .piobuildmega2560srcsrcgcodebedlevelG35.cpp.o Compiling .piobuildmega2560srcsrcgcodebedlevelG42.cpp.o Compiling .piobuildmega2560srcsrcgcodebedlevelM420.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateG28.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateG33.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateG34_M422.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateG425.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateG76_M871.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateM100.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateM12.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateM425.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateM48.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateM665.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateM666.cpp.o Compiling .piobuildmega2560srcsrcgcodecalibrateM852.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM200-M205.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM217.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM218.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM220.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM221.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM281.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM301.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM302.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM304.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM305.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM43.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM540.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM575.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM672.cpp.o Compiling .piobuildmega2560srcsrcgcodeconfigM92.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM108_M112_M410.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM111.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM120_M121.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM17_M18_M84.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM211.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM226.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM280.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM3-M5.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM350_M351.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM380_M381.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM400.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM42.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM605.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM7-M9.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM80_M81.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM85.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM997.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolM999.cpp.o Compiling .piobuildmega2560srcsrcgcodecontrolT.cpp.o Compiling .piobuildmega2560srcsrcgcodeeepromM500-M504.cpp.o Compiling .piobuildmega2560srcsrcgcodefeatureL6470M122.cpp.o Compiling .piobuildmega2560srcsrcgcodefeatureL6470M906.cpp.o Compiling .piobuildmega2560srcsrcgcodefeatureL6470M916-918.cpp.o Compiling .piobuildmega2560srcsrcgcodefeatureadvanceM900.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturebaricudaM126-M129.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturecameraM240.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturecancelM486.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturecaselightM355.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturecleanG12.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturecontrollerfanM710.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturedigipotM907-M910.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturefilwidthM404-M407.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturefwretractG10_G11.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturefwretractM207-M209.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturei2cM260_M261.cpp.o Compiling .piobuildmega2560srcsrcgcodefeatureledsM150.cpp.o Compiling .piobuildmega2560srcsrcgcodefeatureledsM7219.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturemacroM810-M819.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturemixingM163-M165.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturemixingM166.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepauseG27.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepauseG60.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepauseG61.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepauseM125.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepauseM600.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepauseM603.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepauseM701_M702.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepower_monitorM430.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepowerlossM1000.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturepowerlossM413.cpp.o Compiling .piobuildmega2560srcsrcgcodefeatureprusa_MMU2M403.cpp.o Compiling .piobuildmega2560srcsrcgcodefeaturerunoutM412.cpp.o Compiling .piobuildmega2560srcsrcgcodegcode.cpp.o Compiling .piobuildmega2560srcsrcgcodegeometryG17-G19.cpp.o Compiling .piobuildmega2560srcsrcgcodegeometryG53-G59.cpp.o Compiling .piobuildmega2560srcsrcgcodegeometryG92.cpp.o Compiling .piobuildmega2560srcsrcgcodegeometryM206_M428.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM110.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM113.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM114.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM115.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM118.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM119.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM16.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM360.cpp.o Compiling .piobuildmega2560srcsrcgcodehostM876.cpp.o Compiling .piobuildmega2560srcsrcgcodelcdM0_M1.cpp.o Compiling .piobuildmega2560srcsrcgcodelcdM117.cpp.o Compiling .piobuildmega2560srcsrcgcodelcdM145.cpp.o Compiling .piobuildmega2560srcsrcgcodelcdM250.cpp.o Compiling .piobuildmega2560srcsrcgcodelcdM300.cpp.o Compiling .piobuildmega2560srcsrcgcodelcdM73.cpp.o Compiling .piobuildmega2560srcsrcgcodemotionG0_G1.cpp.o Compiling .piobuildmega2560srcsrcgcodemotionG2_G3.cpp.o Compiling .piobuildmega2560srcsrcgcodemotionG4.cpp.o Compiling .piobuildmega2560srcsrcgcodemotionG5.cpp.o Compiling .piobuildmega2560srcsrcgcodemotionG6.cpp.o Compiling .piobuildmega2560srcsrcgcodemotionG80.cpp.o Compiling .piobuildmega2560srcsrcgcodemotionM290.cpp.o Compiling .piobuildmega2560srcsrcgcodeparser.cpp.o Compiling .piobuildmega2560srcsrcgcodeprobeG30.cpp.o Compiling .piobuildmega2560srcsrcgcodeprobeG31_G32.cpp.o Compiling .piobuildmega2560srcsrcgcodeprobeG38.cpp.o Compiling .piobuildmega2560srcsrcgcodeprobeM401_M402.cpp.o Compiling .piobuildmega2560srcsrcgcodeprobeM851.cpp.o Compiling .piobuildmega2560srcsrcgcodeprobeM951.cpp.o Compiling .piobuildmega2560srcsrcgcodequeue.cpp.o Compiling .piobuildmega2560srcsrcgcodescaraM360-M364.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM1001.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM20.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM21_M22.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM23.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM24_M25.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM26.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM27.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM28_M29.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM30.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM32.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM33.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM34.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM524.cpp.o Compiling .piobuildmega2560srcsrcgcodesdM928.cpp.o Compiling .piobuildmega2560srcsrcgcodestatsM31.cpp.o Compiling .piobuildmega2560srcsrcgcodestatsM75-M78.cpp.o Compiling .piobuildmega2560srcsrcgcodetempM104_M109.cpp.o Compiling .piobuildmega2560srcsrcgcodetempM105.cpp.o Compiling .piobuildmega2560srcsrcgcodetempM106_M107.cpp.o Compiling .piobuildmega2560srcsrcgcodetempM140_M190.cpp.o Compiling .piobuildmega2560srcsrcgcodetempM141_M191.cpp.o Compiling .piobuildmega2560srcsrcgcodetempM155.cpp.o Compiling .piobuildmega2560srcsrcgcodetempM303.cpp.o Compiling .piobuildmega2560srcsrcgcodeunitsG20_G21.cpp.o Compiling .piobuildmega2560srcsrcgcodeunitsM149.cpp.o Compiling .piobuildmega2560srcsrcgcodeunitsM82_M83.cpp.o Compiling .piobuildmega2560srcsrclcdextuiui_api.cpp.o Compiling .piobuildmega2560srcsrclcdextui_anycubic_tft.cpp.o Compiling .piobuildmega2560srcsrclcdextui_dgus_lcd.cpp.o Compiling .piobuildmega2560srcsrclcdextui_example.cpp.o Compiling .piobuildmega2560srcsrclcdextui_malyan_lcd.cpp.o Compiling .piobuildmega2560srcsrclcdfontutils.cpp.o Compiling .piobuildmega2560srcsrclcdlcdprint.cpp.o Compiling .piobuildmega2560srcsrclcdultralcd.cpp.o Compiling .piobuildmega2560srcsrclibsBL24CXX.cpp.o Compiling .piobuildmega2560srcsrclibsL64XXL64XX_Marlin.cpp.o Compiling .piobuildmega2560srcsrclibsbuzzer.cpp.o Compiling .piobuildmega2560srcsrclibscrc16.cpp.o Compiling .piobuildmega2560srcsrclibsheatshrinkheatshrink_decoder.cpp.o Compiling .piobuildmega2560srcsrclibshex_print_routines.cpp.o Compiling .piobuildmega2560srcsrclibsleast_squares_fit.cpp.o Compiling .piobuildmega2560srcsrclibsnozzle.cpp.o Compiling .piobuildmega2560srcsrclibsnumtostr.cpp.o Compiling .piobuildmega2560srcsrclibsstopwatch.cpp.o Compiling .piobuildmega2560srcsrclibsvector_3.cpp.o Compiling .piobuildmega2560srcsrcmoduleconfiguration_store.cpp.o Compiling .piobuildmega2560srcsrcmoduledelta.cpp.o Compiling .piobuildmega2560srcsrcmoduleendstops.cpp.o Compiling .piobuildmega2560srcsrcmodulemotion.cpp.o Compiling .piobuildmega2560srcsrcmoduleplanner.cpp.o Compiling .piobuildmega2560srcsrcmoduleplanner_bezier.cpp.o Compiling .piobuildmega2560srcsrcmoduleprintcounter.cpp.o Compiling .piobuildmega2560srcsrcmoduleprobe.cpp.o Compiling .piobuildmega2560srcsrcmodulescara.cpp.o Compiling .piobuildmega2560srcsrcmoduleservo.cpp.o Compiling .piobuildmega2560srcsrcmodulestepper.cpp.o Compiling .piobuildmega2560srcsrcmodulestepperL64xx.cpp.o Compiling .piobuildmega2560srcsrcmodulestepperTMC26X.cpp.o Compiling .piobuildmega2560srcsrcmodulestepperindirection.cpp.o Compiling .piobuildmega2560srcsrcmodulesteppertrinamic.cpp.o Compiling .piobuildmega2560srcsrcmoduletemperature.cpp.o Compiling .piobuildmega2560srcsrcmoduletool_change.cpp.o Compiling .piobuildmega2560srcsrcsdSd2Card.cpp.o Compiling .piobuildmega2560srcsrcsdSdBaseFile.cpp.o Compiling .piobuildmega2560srcsrcsdSdFatUtil.cpp.o Compiling .piobuildmega2560srcsrcsdSdFile.cpp.o Compiling .piobuildmega2560srcsrcsdSdVolume.cpp.o Compiling .piobuildmega2560srcsrcsdcardreader.cpp.o Compiling .piobuildmega2560lib414ESP Async WebServerAsyncEventSource.cpp.o Compiling .piobuildmega2560lib414ESP Async WebServerAsyncWebSocket.cpp.o In file included from C:UsersOnion.platformiolibESP Async WebServersrcAsyncEventSource.cpp:21:0: C:UsersOnion.platformiolibESP Async WebServersrcAsyncEventSource.h:27:25: fatal error: ESPAsyncTCP.h: No such file or directory ********************************************************************* * Looking for ESPAsyncTCP.h dependency? Check our library registry! * * CLI > platformio lib search «header:ESPAsyncTCP.h» * Web > https://platformio.org/lib/search?query=header:ESPAsyncTCP.h * ********************************************************************* compilation terminated. Compiling .piobuildmega2560lib414ESP Async WebServerSPIFFSEditor.cpp.o In file included from C:UsersOnion.platformiolibESP Async WebServersrcAsyncWebSocket.cpp:22:0: C:UsersOnion.platformiolibESP Async WebServersrcAsyncWebSocket.h:29:25: fatal error: ESPAsyncTCP.h: No such file or directory ********************************************************************* * Looking for ESPAsyncTCP.h dependency? Check our library registry! * * CLI > platformio lib search «header:ESPAsyncTCP.h» * Web > https://platformio.org/lib/search?query=header:ESPAsyncTCP.h * ********************************************************************* compilation terminated. *** [.piobuildmega2560lib414ESP Async WebServerAsyncWebSocket.cpp.o] Error 1 *** [.piobuildmega2560lib414ESP Async WebServerAsyncEventSource.cpp.o] Error 1 In file included from C:UsersOnion.platformiolibESP Async WebServersrcSPIFFSEditor.h:3:0, from C:UsersOnion.platformiolibESP Async WebServersrcSPIFFSEditor.cpp:1: C:UsersOnion.platformiolibESP Async WebServersrc/ESPAsyncWebServer.h:26:22: fatal error: functional: No such file or directory compilation terminated. *** [.piobuildmega2560lib414ESP Async WebServerSPIFFSEditor.cpp.o] Error 1″>
Additional Information
Last working compile was before this commit. I’m not sure how relevant this is but another user had similar include errors recently (#18739). Neither installing the ESPAsyncTCP library from here nor commenting lib_ignore=ESPAsyncTCP in platformio.ini will fix the issue.
The text was updated successfully, but these errors were encountered:
Источник
-
wolfrose
- Posts: 7
- Joined: Mon Oct 26, 2020 2:58 pm
ESPAsyncWebServer.h: No such file or directory
Hi,
I’m trying to compile an example in this website.
https://shawnhymel.com/1882/how-to-crea … n-arduino/
But I get this error. I have downloaded both ESPAsyncWebServer.h and AsyncTCP.h and put them in ESP32 libraries folder but I get the same error ! What to do now ?
I read in this page:
https://github.com/me-no-dev/ESPAsyncWebServer
This:
For ESP8266 it requires ESPAsyncTCP To use this library you might need to have the latest git versions of ESP8266 Arduino Core
For ESP32 it requires AsyncTCP to work To use this library you might need to have the latest git versions of ESP32 Arduino Core
So I did what it tells and put:
ESPAsyncWebServer with ESPAsyncTCP in ESP8266 folder
AsyncTCP with ESPAsyncWebServer in ESP32 folder
But same error !
-
lbernstone
- Posts: 311
- Joined: Mon Jul 22, 2019 3:20 pm
Re: ESPAsyncWebServer.h: No such file or directory
Postby lbernstone » Mon Oct 26, 2020 5:23 pm
The Arduino library folder is <home>/Arduino/libraries. This is where libraries downloaded using the library manager end up.
Do not put anything in .arduino15/packages/esp32/**. This is the built-in board specific libraries and will be removed/updated with the board.
-
wolfrose
- Posts: 7
- Joined: Mon Oct 26, 2020 2:58 pm
Re: ESPAsyncWebServer.h: No such file or directory
Postby wolfrose » Wed Oct 28, 2020 4:19 pm
Yep, you’re right. They must be in this path.
OK, now I’ve got another problem. I can’t run the ESP32 to connect to my wifi as the same example with the esp8266. I’ve done the esp8266 webserver example without problems. The esp32 isn’t responding.
Who is online
Users browsing this forum: Bing [Bot] and 21 guests
This tutorial shows how to build an ESP8266 NodeMCU web server with a slider to control the LED brightness. You’ll learn how to add a slider to your web server projects, get its value and save it in a variable that the ESP8266 can use. We’ll use that value to control the duty cycle of a PWM signal and change the brightness of an LED. Instead of an LED you can control a servo motor, for example.
Additionally, you can also modify the code in this tutorial to add a slider to your projects to set a threshold value or any other value that you need to use in your code.
Project Overview
- The ESP8266 hosts a web server that displays a web page with a slider;
- When you move the slider, you make an HTTP request to the ESP8266 with the new slider value;
- The HTTP request comes in the following format: GET/slider?value=SLIDERVALUE, in which SLIDERVALUE is a number between 0 and 1023. You can modify your slider to include any other range;
- From the HTTP request, the ESP8266 gets the current value of the slider;
- The ESP8266 adjusts the PWM duty cycle accordingly to the slider value;
- This can be useful to control the brightness of an LED (as we’ll do in this example), a servo motor, setting up a threshold value or other applications.
Prerequisites
Before proceeding with this project, make sure you check the following prerequisites.
Arduino IDE
We’ll program the ESP8266 NodeMCU board using Arduino IDE, so before proceeding with this tutorial, make sure you have the ESP8266 board installed in your Arduino IDE.
- Installing ESP8266 NodeMCU Board in Arduino IDE (Windows, Mac OS X, and Linux)
Async Web Server Libraries
We’ll build the web server using the following libraries:
- ESPAsyncWebServer
- ESPAsyncTCP
These libraries aren’t available to install through the Arduino Library Manager, so you need to copy the library files to the Arduino Installation Libraries folder. Alternatively, in your Arduino IDE, you can go to Sketch > Include Library > Add .zip Library and select the libraries you’ve just downloaded.
Code
The following code controls the brightness of the ESP8266 built-in LED using a slider on a web server. In other words, you can change the PWM duty cycle with a slider. This can be useful to control the LED brightness or control a servo motor, for example.
Copy the code to your Arduino IDE. Insert your network credentials and the code will work straight way.
/*********
Rui Santos
Complete project details at https://RandomNerdTutorials.com/esp8266-nodemcu-web-server-slider-pwm/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
*********/
// Import required libraries
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
// Replace with your network credentials
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
const int output = 2;
String sliderValue = "0";
const char* PARAM_INPUT = "value";
// Create AsyncWebServer object on port 80
AsyncWebServer server(80);
const char index_html[] PROGMEM = R"rawliteral(
<!DOCTYPE HTML><html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ESP Web Server</title>
<style>
html {font-family: Arial; display: inline-block; text-align: center;}
h2 {font-size: 2.3rem;}
p {font-size: 1.9rem;}
body {max-width: 400px; margin:0px auto; padding-bottom: 25px;}
.slider { -webkit-appearance: none; margin: 14px; width: 360px; height: 25px; background: #FFD65C;
outline: none; -webkit-transition: .2s; transition: opacity .2s;}
.slider::-webkit-slider-thumb {-webkit-appearance: none; appearance: none; width: 35px; height: 35px; background: #003249; cursor: pointer;}
.slider::-moz-range-thumb { width: 35px; height: 35px; background: #003249; cursor: pointer; }
</style>
</head>
<body>
<h2>ESP Web Server</h2>
<p><span id="textSliderValue">%SLIDERVALUE%</span></p>
<p><input type="range" onchange="updateSliderPWM(this)" id="pwmSlider" min="0" max="1023" value="%SLIDERVALUE%" step="1" class="slider"></p>
<script>
function updateSliderPWM(element) {
var sliderValue = document.getElementById("pwmSlider").value;
document.getElementById("textSliderValue").innerHTML = sliderValue;
console.log(sliderValue);
var xhr = new XMLHttpRequest();
xhr.open("GET", "/slider?value="+sliderValue, true);
xhr.send();
}
</script>
</body>
</html>
)rawliteral";
// Replaces placeholder with button section in your web page
String processor(const String& var){
//Serial.println(var);
if (var == "SLIDERVALUE"){
return sliderValue;
}
return String();
}
void setup(){
// Serial port for debugging purposes
Serial.begin(115200);
analogWrite(output, sliderValue.toInt());
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi..");
}
// Print ESP Local IP Address
Serial.println(WiFi.localIP());
// Route for root / web page
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", index_html, processor);
});
// Send a GET request to <ESP_IP>/slider?value=<inputMessage>
server.on("/slider", HTTP_GET, [] (AsyncWebServerRequest *request) {
String inputMessage;
// GET input1 value on <ESP_IP>/slider?value=<inputMessage>
if (request->hasParam(PARAM_INPUT)) {
inputMessage = request->getParam(PARAM_INPUT)->value();
sliderValue = inputMessage;
analogWrite(output, sliderValue.toInt());
}
else {
inputMessage = "No message sent";
}
Serial.println(inputMessage);
request->send(200, "text/plain", "OK");
});
// Start server
server.begin();
}
void loop() {
}
View raw code
How the Code Works
Continue reading to learn how the code works or skip to the next section.
Importing libraries
First, import the required libraries. The ESP8266WiFi, ESPAsyncWebServer and the ESPAsyncTCP are needed to build the web server.
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
Setting your network credentials
Insert your network credentials in the following variables, so that the ESP8266 can connect to your local network.
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
Variables definition
We’ll control the brightness of the ESP8266 built-in LED. The built-in LED corresponds to GPIO 2. Save the GPIO we want to control on the output variable.
const int output = 2;
The sliderValue variable will hold the slider value. At start, it is set to zero.
String sliderValue = "0";
Input Parameters
The PARAM_INPUT variable will be used to “search” for the slider value on the request received by the ESP8266 when the slider is moved. (Remember: the ESP8266 will receive a request like this GET/slider?value=SLIDERVALUE)
const char* PARAM_INPUT = "value";
It will search for value on the URL and get the value assigned to it.
Building the Web Page
Let’s now proceed to the web server page.
The web page for this project is pretty simple. It contains one heading, one paragraph and one input of type range.
Let’s see how the web page is created.
All the HTML text with styles included is stored in the index_html variable. Now we’ll go through the HTML text and see what each part does.
The following <meta> tag makes your web page responsive in any browser.
<meta name="viewport" content="width=device-width, initial-scale=1">
Between the <title> </title> tags goes the title of our web server. The title is the text that shows up on the web browser tab.
Styles
Between the <style></style> tags, we add some CSS to style the web page.
<style>
html {font-family: Arial; display: inline-block; text-align: center;}
h2 {font-size: 2.3rem;}
p {font-size: 1.9rem;}
body {max-width: 400px; margin:0px auto; padding-bottom: 25px;}
.slider { -webkit-appearance: none; margin: 14px; width: 360px; height: 25px; background: #FFD65C;
outline: none; -webkit-transition: .2s; transition: opacity .2s;}
.slider::-webkit-slider-thumb {-webkit-appearance: none; appearance: none; width: 35px; height: 35px; background: #003249; cursor: pointer;}
.slider::-moz-range-thumb { width: 35px; height: 35px; background: #003249; cursor: pointer; }
</style>
Basically, we’re setting the HTML page to display the text with Arial font in block without margin, and aligned at the center.
html {font-family: Arial; display: inline-block; text-align: center;}
The following lines set the font size for the heading (h2) and paragraph (p).
h2 {font-size: 2.3rem;}
p {font-size: 1.9rem;}
Set the HTML body properties.
body {max-width: 400px; margin:0px auto; padding-bottom: 25px;}
The following lines customize the slider:
.slider { -webkit-appearance: none; margin: 14px; width: 360px; height: 25px; background: #FFD65C;
outline: none; -webkit-transition: .2s; transition: opacity .2s;}
.slider::-webkit-slider-thumb {-webkit-appearance: none; appearance: none; width: 35px; height: 35px; background: #003249; cursor: pointer;}
.slider::-moz-range-thumb { width: 35px; height: 35px; background: #003249; cursor: pointer; }
HTML Body
Inside the <body></body> tags is where we add the web page content.
The <h2></h2> tags add a heading to the web page. In this case, the “ESP Web Server” text, but you can add any other text.
<h2>ESP Web Server</h2>
The first paragraph will contain the current slider value. That particular HTML tag has the id textSliderValue assign to it, so that we can reference it later.
<p><span id="textSliderValue">%SLIDERVALUE%</span></p>
The %SLIDERVALUE% is a placeholder for the slider value. This will be replaced by the ESP8266 by an actual value when it sends it to the browser. This is useful to show the current value when you access the browser for the first time.
Creating a Slider
To create a slider in HTML you use the <input> tag. The <input> tag specifies a field where the user can enter data.
There are a wide variety of input types. To define a slider, use the “type” attribute with the “range” value. In a slider, you also need to define the minimum and the maximum range using the “min” and “max” attributes (in this case, 0 and 1023, respectively).
<p><input type="range" onchange="updateSliderPWM(this)" id="pwmSlider" min="0" max="1023" value="%SLIDERVALUE%" step="1" class="slider"></p>
You also need to define other attributes like:
- the step attribute specifies the interval between valid numbers. In our case, it is set to 1;
- the class to style the slider (class=”slider”);
- the id to update the current position displayed on the web page;
- the onchange attribute to call a function (updateSliderPWM(this)) to send an HTTP request to the ESP8266 when the slider moves. The this keyword refers to the current value of the slider.
Adding JavaScript to the HTML File
Next, you need to add some JavaScript code to your HTML file using the <script> and </script> tags. You need to add the updateSliderPWM() function that will make a request to the ESP8266 with the current slider value.
<script>
function updateSliderPWM(element) {
var sliderValue = document.getElementById("pwmSlider").value;
document.getElementById("textSliderValue").innerHTML = sliderValue;
console.log(sliderValue);
var xhr = new XMLHttpRequest();
xhr.open("GET", "/slider?value="+sliderValue, true);
xhr.send();
}
</script>
This next line gets the current slider value by its id and saves it in the sliderValue JavaScript variable. Previously, we’ve assigned the id of the slider to pwmSlider. So, we get it as follows:
var sliderValue = document.getElementById("pwmSlider").value;
After that, we set the slider label (whose id is textSliderValue) to the value saved on the sliderValue variable.
Finally, make an HTTP GET request.
var xhr = new XMLHttpRequest();
xhr.open("GET", "/slider?value="+sliderValue, true);
xhr.send();
For example, when the slider is at 0, you make an HTTP GET request on the following URL:
http://ESP-IP-ADDRESS/slider?value=0
And when the slider value is 200, you’ll have a request on the follow URL.
http://ESP-IP-ADDRESS/slider?value=200
This way, when the ESP8266 receives the GET request, it can retrieve the value parameter in the URL and control the PWM signal accordingly as we’ll se in the next sections
Processor
Now, we need to create the processor() function, that will replace the placeholders in our HTML text with the current slider value when you access it for the first time in a browser.
// Replaces placeholder with button section in your web page
String processor(const String& var){
//Serial.println(var);
if (var == "SLIDERVALUE"){
return sliderValue;
}
return String();
}
When the web page is requested, we check if the HTML has any placeholders. If it finds the %SLIDERVALUE% placeholder, we return the value saved on the sliderValue variable.
setup()
In the setup(), initialize the Serial Monitor for debugging purposes.
Serial.begin(115200);
Set the duty cycle of the PWM signal to the value saved on the sliderValue (when the ESP8266 starts, it is set to 0).
analogWrite(output, sliderValue.toInt());
To learn more about PWM with the ESP8266, read our guide: ESP8266 PWM with Arduino IDE (Analog Output).
Connect to your local network and print the ESP8266 IP address.
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi..");
}
// Print ESP Local IP Address
Serial.println(WiFi.localIP());
Handle Requests
Finally, add the next lines of code to handle the web server.
// Route for root / web page
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", index_html, processor);
});
// Send a GET request to <ESP_IP>/slider?value=<inputMessage>
server.on("/slider", HTTP_GET, [] (AsyncWebServerRequest *request) {
String inputMessage;
// GET input1 value on <ESP_IP>/slider?value=<inputMessage>
if (request->hasParam(PARAM_INPUT)) {
inputMessage = request->getParam(PARAM_INPUT)->value();
sliderValue = inputMessage;
ledcWrite(ledChannel, sliderValue.toInt());
}
else {
inputMessage = "No message sent";
}
Serial.println(inputMessage);
request->send(200, "text/plain", "OK");
});
When we make a request on the root URL, we send the HTML text that is stored on the index_html variable. We also need to pass the processor() function, that will replace all the placeholders with the right values.
// Route for root / web page
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", index_html, processor);
});
We need another handler that will save the current slider value and set he LED brightness accordingly.
server.on("/slider", HTTP_GET, [] (AsyncWebServerRequest *request) {
String inputMessage;
// GET input1 value on <ESP_IP>/slider?value=<inputMessage>
if (request->hasParam(PARAM_INPUT)) {
inputMessage = request->getParam(PARAM_INPUT)->value();
sliderValue = inputMessage;
ledcWrite(ledChannel, sliderValue.toInt());
}
else {
inputMessage = "No message sent";
}
Serial.println(inputMessage);
request->send(200, "text/plain", "OK");
});
Basically, we get the slider value on the following lines:
if (request->hasParam(PARAM_INPUT)) {
inputMessage = request->getParam(PARAM_INPUT)->value();
sliderValue = inputMessage;
Then, update the LED brightness (PWM duty cycle) using the ledcWrite() function that accepts as arguments the channel you want to control and the value.
ledcWrite(ledChannel, sliderValue.toInt());
Lastly, start the server.
server.begin();
Because this is an asynchronous web server, we don’t need to write anything in the loop().
void loop(){
}
That’s pretty much how the code works.
Upload the Code
Now, upload the code to your ESP8266. Make sure you have the right board and COM port selected.
After uploading, open the Serial Monitor at a baud rate of 115200. Press the ESP8266 reset button. The ESP8266 IP address should be printed in the serial monitor.
Web Server Demonstration
Open a browser and type the ESP8266 IP address. Your web server should display the slider and its current value.
Move the slider and see the ESP8266 built-in LED increasing and decreasing its brightness.
Wrapping Up
With this tutorial you’ve learned how to add a slider to your web server projects and get and save its value on a variable that the ESP8266 can use. As an example, we’re controlling a PWM signal to control the brightness of an LED. Instead of an LED, you can control a servo motor, for example.
Additionally, the slider may also be used to set up a threshold or any other value that you need to be set up and then be used by the ESP8266 to decide on something.
If you’re using an ESP32 board, read ESP32 Web Server with Slider Control LED Brightness (PWM).
We hope you’ve found this project useful. You may also like the following tutorials:
- ESP-NOW Two-Way Communication Between ESP8266 NodeMCU Boards
- ESP Web Server – Control Outputs with Timer
- ESP8266 DHT11/DHT22 Web Server – Temperature and Humidity
Learn more about the ESP8266 with our resources:
- Home Automation using ESP8266 (eBook)
- More ESP8266 NodeMCU Projects and Tutorials…
Thanks for reading.