rzeldent / esp32-smartdisplay-demo

Demo project for esp32-smartdisplay
56 stars 20 forks source link

tone() not found #1

Closed erich74 closed 1 year ago

erich74 commented 1 year ago

Hi, First off, thanks a lot for your work, I am starting with those Sunton boards and this is really helping. I have setup a PIO/VSCode project to compile your demo code as a starting point for my project. When compiling but I've got this error:

.pio\libdeps\esp32dev\esp32_smartdisplay\src\esp32_smartdisplay.cpp:139:38: error: 'tone' was not declared in this scope

I understand tone() is part of Arduino core library but looks like this is not part of the arduino declination in PIO.

Do you have an idea how to fix it? Thanks! Eric

rzeldent commented 1 year ago

Hi Eric,

Thanks for mentioning it. I'll have to look into this because it worked. Maybe something was taken out of theArduino core. I'll have to take a look what's going on.

In the mean time, if you're not using it I suggest you just star out the beep function in esp32_smartdisplay.cpp (in the .pio srouce directory).

Enjoy!

erich74 commented 1 year ago

Thank you very much for your quick answer. I was planning to use it but I have an 8ohm speaker being shipped so this is not really urgent. Yes I did comment out this line and compilation was ok. Thanks again, you are doing an amazing job, I have ordered additionnal boards (different sizes with capacitive touch screen) thanks to your project I can easily setup new project without the complexity and flaws you have sorted out for us!

rzeldent commented 1 year ago

Still very strange. I re-triggered the build action that is used to rebuild. This worked fine. Are you using a special library for the esp-32. Have you tried upgrading the packages?

erich74 commented 1 year ago

Here is my platformio.ini, I have not set any additionnal library for the moment:

[env:esp32dev] platform = espressif32 board = esp32dev framework = arduino monitor_speed = 115200

build_flags = -Ofast

-Wall

-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
# LVGL settings
#-D LV_CONF_PATH=${platformio.include_dir}/lv_conf.h
-D LV_CONF_PATH=../../../../include/lv_conf.h
# Smartdisplay settings
-D TFT_PANEL_ORDER_RGB
#-D TFT_PANEL_ORDER_BGR
#-D TFT_ORIENTATION_PORTRAIT
-D TFT_ORIENTATION_LANDSCAPE
#-D TFT_ORIENTATION_PORTRAIT_INV
#-D TFT_ORIENTATION_LANDSCAPE_INV
-D ESP32_2432S028R
#-D ESP32_3248S035R
#-D ESP32_3248S035C

lib_deps = https://github.com/rzeldent/esp32-smartdisplay.git

erich74 commented 1 year ago

and the terminal build output:

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)

Library Manager: Installing ^2.0.0. Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html PLATFORM: Espressif 32 (3.5.0) > Espressif ESP32 Dev Module HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:

rzeldent commented 1 year ago

Hi Eric,

I see there are different versions. See below the output from the build action..

Platform has been successfully updated
WARNING: This command is deprecated and will be removed in the next releases.
Please use `pio pkg update` instead.
Platform Manager: Updating espressif32 @ 6.0.1
Platform Manager: Removing espressif32 @ 6.0.1
Platform Manager: espressif32@6.0.1 has been removed!
Platform Manager: Installing platformio/espressif32 @ 6.1.0Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%Unpacking
Platform Manager: espressif32@6.1.0 has been installed!
Tool Manager: toolchain-xtensa-esp32@8.4.0+2021r2-patch5 is already installed
Tool Manager: Installing platformio/tool-esptoolpy @ ~1.40500.0Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
UnpackingTool Manager: tool-esptoolpy@1.40500.0 has been installed!
Tool Manager: tool-cmake@3.16.4 is already up-to-date
Tool Manager: tool-esptoolpy@1.40500.0 is already up-to-date
Tool Manager: tool-mkfatfs@2.0.1 is already up-to-date
Tool Manager: tool-mklittlefs@1.203.210628 is already up-to-date
Tool Manager: tool-mkspiffs@2.230.0 is already up-to-date
Tool Manager: tool-ninja@1.9.0 is already up-to-date
Tool Manager: tool-openocd-esp32@2.1100.20220706 is already up-to-date
Tool Manager: toolchain-xtensa-esp32@8.4.0+2021r2-patch5 is already up-to-date

You could try to update your system; try pio pkg update

Maybe this helps...

Kind regards,

Rene

erich74 commented 1 year ago

Hi Rene,

It works now after pio pkg update ! Thanks a lot! Eric

rzeldent commented 1 year ago

Great!!

Enjoy!