Use_Servo support?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Use_Servo support?

#1 Post by uxhamby » 03 Feb 2024, 22:05

Hi,

I need a binary version of ESPEASY, that supports use of servos, to apply to a 1MB ESP8266.

How can I identify a recent firmware for this?

(ESP_Easy_mega_20210114_normal_ESP8266_1M, which is currently running on this device yields "4215286618: USE_SERVO not included in build" if I attempt to address a servo. )

Your thoughts & advice?

Thanks,


Brian H.

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

Re: Use_Servo support?

#2 Post by Ath » 03 Feb 2024, 22:14

Best solution would probably be to build a Custom version of ESPEasy, that has the plugins you need, and FEATURE_SERVO 1 (enabled, we renamed the USE_ defines to FEATURE_ with value 0 or 1).

(I really need to update the docs on how to build a Custom ESPEasy using VSCode/PlatformIO, either by modifying the pre_custom_esp....py or Custom.h files)
/Ton (PayPal.me)

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Use_Servo support?

#3 Post by uxhamby » 03 Feb 2024, 23:16

VSCode/PlatformIO
Will that run under Linux? I am pretty much exclusively Linux based these days.

Thx.

Brian H.

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

Re: Use_Servo support?

#4 Post by Ath » 04 Feb 2024, 14:09

Yes, both VSCode and PlatformIO will run on Windows, Linux and Mac. (It's just that I'm a Windows user, but that shouldn't stop you from doing this on Linux :lol:)

Most likely VSCode expects you to run a GUI (not just a plain text terminal via ssh), but I expect anyone using Linux on a desktop/laptop computer does that via a Graphical User Interface. (The only Linux I regularly interact with are servers, from cloud-based application-servers with the latest Redhat OS to a RPi running my Domoticz instance ;))
/Ton (PayPal.me)

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

Re: Use_Servo support?

#5 Post by TD-er » 04 Feb 2024, 14:13

You can also look at the build script in the tools directory.
Please make sure to read the script first to see if there are any wrong assumptions being made for your platform.

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

Re: Use_Servo support?

#6 Post by Ath » 04 Feb 2024, 16:42

It seems I'll have to add a KEEP_SERVO compile-time flag, like done for RTTTL, to have that enabled, as even for the Custom ESP8266 1M builds the Servo feature is forcefully inhibited :?
I'll see what I can do about that.
/Ton (PayPal.me)

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

Re: Use_Servo support?

#7 Post by Ath » 04 Feb 2024, 20:01

@uxhamby I've added a pull request to allow FEATURE_SERVO to be enabled for Custom builds, but none of the Custom builds has that enabled by default.
Can you list the plugins you actually use, then I'll build a custom ESP8266 1MB firmware with those plugins and Servo enabled, for you to test.
/Ton (PayPal.me)

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Use_Servo support?

#8 Post by uxhamby » 05 Feb 2024, 22:51

Hi,
I'll build a custom ESP8266 1MB firmware with those plugins and Servo enabled, for you to test.
Thanks!

At this time I am only using the Servo on this particular device and triggering it with HTTL and MQTT commands from elsewhere. I do need to make use of the position 9000 command to turn the power off to the Servo, presumably that is part and parcel of the Servo plugin?


Cheers,

Brian H.

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Use_Servo support?

#9 Post by uxhamby » 05 Feb 2024, 23:03

Hi,
(I really need to update the docs on how to build a Custom ESPEasy using VSCode/PlatformIO, either by modifying the pre_custom_esp....py or Custom.h files)
Yes, I would like this too. Where are the existing docs located?

Thanks,

Brian H.

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

Re: Use_Servo support?

#10 Post by Ath » 05 Feb 2024, 23:37

uxhamby wrote: 05 Feb 2024, 22:51 At this time I am only using the Servo on this particular device and triggering it with HTTL and MQTT commands from elsewhere. I do need to make use of the position 9000 command to turn the power off to the Servo, presumably that is part and parcel of the Servo plugin?
That switching off at 9000 is indeed a feature of the servo command/handling, and as documented here (scroll down a bit to the servo command)
uxhamby wrote: 05 Feb 2024, 23:03 Yes, I would like this too. Where are the existing docs located?
There's a PlatformIO page that describes how to set up the required components (the Python part is aimed at Windows, as that doesn't come standard with Python), You'll need Python 3.11 installed.
The Custom build stuff is documented on that same page, over here: PlatformIO page, the example uses the custom_ESP8266_4M1M environment, but for the 1M devices, you'll need either custom_274_ESP8266_1M (using the default Arduino 2.74 framework) or custom_beta_ESP8266_1M (using an Arduino framework 3.x beta).

Uploading such build, that's to be found in the "<ESPEasy_checkout>/build_output/bin" directory, should be a known procedure for you, I assume ;)

I've created a build, from the PR mentioned above, with a modified: tools/pio/pre_custom_esp82xx.py (included in the .zip):
ESP_Easy_mega_20240205_custom_274_ESP8266_1M.zip
(456.85 KiB) Downloaded 45 times
/Ton (PayPal.me)

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Use_Servo support?

#11 Post by uxhamby » 07 Feb 2024, 22:49

I've created a build, from the PR mentioned above, with a modified: tools/pio/pre_custom_esp82xx.py (included in the .zip):

Thanks!

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

Re: Use_Servo support?

#12 Post by Ath » 11 Feb 2024, 21:19

This improvement has been merged and will be available in the next release of ESPEasy :)
/Ton (PayPal.me)

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Use_Servo support?

#13 Post by uxhamby » 14 Feb 2024, 03:57

Here is my servo in operation:

https://youtube.com/shorts/GmPMB6-Er2Q? ... k-uFIbpi0p

This is rework of an old project from before the position 9000 was included. The servos were short lived under the strain. Hopefully the position 9000 power down, will help with servo longevity.

Thanks again,

Brian H.

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

Re: Use_Servo support?

#14 Post by TD-er » 14 Feb 2024, 08:42

I think your light switch also needs some 3D printed cover :)

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests