ESP32 Servo + touch

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ingoiot
Normal user
Posts: 83
Joined: 15 Aug 2019, 22:09

ESP32 Servo + touch

#1 Post by ingoiot » 27 Feb 2021, 21:44

hi,

i need a build with "touch" and "servo" functionality.

i tried custom and test where "touch" works,and normal where "servo" works.
i thought test and custom include everything that normal does.

is there a build where touch and servo on the ESP32 do work?

User avatar
Ath
Normal user
Posts: 3418
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 Servo + touch

#2 Post by Ath » 28 Feb 2021, 10:39

Currently there isn't. In the limit_build_size builds, like normal and testing, the servo functionality is disabled.
There are 2 solutions: Build your own by using a Custom.h file, or persuade someone to make a customized build for you.
/Ton (PayPal.me)

ingoiot
Normal user
Posts: 83
Joined: 15 Aug 2019, 22:09

Re: ESP32 Servo + touch

#3 Post by ingoiot » 28 Feb 2021, 14:39

tnx,
i´ll try to build one.

whats the "limit_build_size builds"?

looks like in my "normal" the servo is enabled.

i used "ESP_Easy_mega_20210223_test_ESP32_4M316k.bin"

whats the difference to the ETH version?

User avatar
Ath
Normal user
Posts: 3418
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 Servo + touch

#4 Post by Ath » 28 Feb 2021, 15:01

ingoiot wrote: 28 Feb 2021, 14:39 whats the "limit_build_size builds"?
To reduce the flash used, some functions are not included in the code during compilation. The #define introduced for that is LIMIT_BUILD_SIZE (I typed it in lowercase as I was using a tablet for that reply). It is applicable for most MINIMAL builds, the TESTING builds and all 1MB and VCC builds.
ingoiot wrote: 28 Feb 2021, 14:39 looks like in my "normal" the servo is enabled.
Ah, correct, the normal builds don't have that #define set.
ingoiot wrote: 28 Feb 2021, 14:39 i used "ESP_Easy_mega_20210223_test_ESP32_4M316k.bin"

whats the difference to the ETH version?
The ETH builds are for ESP32 boards with (wired) Ethernet controllers (with a limited set of supported controllers, and some pre-configured GPIO settings to support that). If you have to ask, you don't use that type of ESP :lol:
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3418
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 Servo + touch

#5 Post by Ath » 28 Feb 2021, 15:09

ingoiot wrote: 28 Feb 2021, 14:39 i´ll try to build one.
An easy way to achieve that is to add #define USES_P097 to the PLUGIN_SET_STABLE section in define_plugin_sets.h file and build the env:normal_ESP32_4M316k configuration (not available in the nightly builds AFAICS)
/Ton (PayPal.me)

ingoiot
Normal user
Posts: 83
Joined: 15 Aug 2019, 22:09

Re: ESP32 Servo + touch

#6 Post by ingoiot » 28 Feb 2021, 16:31

tnx,
seems to work - even if i dont know what i´m doing^^

is "open the file “pre_extra_script.py” and add or remove the plugins and controllers you need. "

obsolete? i couldnt find that file.

User avatar
Ath
Normal user
Posts: 3418
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 Servo + touch

#7 Post by Ath » 28 Feb 2021, 16:43

I think that a bit old, as I do see pre_custom_esp32.py and pre_custom_esp82xx.py but probably the doc's weren't updated when the file was split for ESP32 and ESP82xx definitions.

There you would have to add

Code: Select all

"-DUSE_SERVO",
(including the quotes and the comma, really close to any of the other -D lines) on a separate line and build the env:custom_ESP32_4M316k configuration.

Edit: Be sure to remove/rename your Custom.h file (if any), as that will take preference over the settings in this script.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 Servo + touch

#8 Post by TD-er » 28 Feb 2021, 20:32

Those pre_....py files have moved a while ago to tools/PIO folder
Maybe some documentation is outdated ?

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests