add SG90 servo
Moderators: grovkillen, Stuntteam, TD-er
add SG90 servo
Hi to all, how can I add a SG90 http://www.ee.ic.ac.uk/pcheung/teaching ... asheet.pdf servo to the espeasy? Is there a special release for the servos? May I connect it directly? Which device should I choose for control it? Can anybody help me, I cannot find any tutorial about it and no answer at search.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: add SG90 servo
You can control the servo using the servo commands: https://espeasy.readthedocs.io/en/lates ... motor-page
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: add SG90 servo
I've got it thanksgrovkillen wrote: ↑22 Apr 2020, 18:37 You can control the servo using the servo commands: https://espeasy.readthedocs.io/en/lates ... motor-page

-
- New user
- Posts: 1
- Joined: 28 Dec 2021, 13:59
Re: add SG90 servo
Also THX for the link.grovkillen wrote: ↑22 Apr 2020, 18:37 You can control the servo using the servo commands: https://espeasy.readthedocs.io/en/lates ... motor-page
But i don´t understand the syntax: "Servo,1,12,-45"
What ist "1" and "12" for?
Re: add SG90 servo
That is explained in that documentation, the servo-id can be 1 or 2, and 12 is the GPIO pin the servo is connected to. This implies there can be max. 2 servos active at the same time.Christian72D wrote: ↑28 Dec 2021, 14:01 But i don´t understand the syntax: "Servo,1,12,-45"
What ist "1" and "12" for?
/Ton (PayPal.me)
Re: add SG90 servo
That index may be outdated.
For ESP32 that number is for sure no longer limited to 2, but not 100% sure about ESP8266.
I guess it only needs the GPIO now and the servo index is left for compatibility reasons.
For ESP32 that number is for sure no longer limited to 2, but not 100% sure about ESP8266.
I guess it only needs the GPIO now and the servo index is left for compatibility reasons.
Re: add SG90 servo
Hello. I tried to use the instructions here, but got the answer "failed". What has changed when working with a servo?
Re: add SG90 servo
What ESPEasy build are you using?
What plugins have you activated?
What commands or rules are you using?
What plugins have you activated?
What commands or rules are you using?
/Ton (PayPal.me)
Re: add SG90 servo
I think the "what build" is the most important question, as the servo code is not included in all builds
Re: add SG90 servo
ESP_Easy_mega_20211224_display_ESP8266_4M1M Dec 24 2021
I give the command servo,1,12,-45 from the rules, from the command line
I give the command servo,1,12,-45 from the rules, from the command line
Re: add SG90 servo
I got an interesting effect when I applied PWM,14,100 to the servo's input. the servo started to rotate continuously 

Re: add SG90 servo
A servo pulse is a bit different from normal PWM as in the duty cycle is extremely small and the frequency is also relatively low.
So you really need a build with "servo" included.
So you really need a build with "servo" included.
Re: add SG90 servo
Which version should I select if I want to work with servo sg90. I can no longer see the wood for the trees in the files
Re: add SG90 servo
Yep it has indeed been a bit 'muddy' with all those extra defines to make it all fit.
It should at least be present in 'normal' builds and looking at the code, it should be present in the 'display' build for ESP8266.
There is no plugin for Servo, just the commands.
See: https://espeasy.readthedocs.io/en/lates ... motor.html
Maybe better to use the latest builds, as I know Ton did enable it recently for more builds.
https://td-er.nl/ESPEasy/latest/
It should at least be present in 'normal' builds and looking at the code, it should be present in the 'display' build for ESP8266.
There is no plugin for Servo, just the commands.
See: https://espeasy.readthedocs.io/en/lates ... motor.html
Maybe better to use the latest builds, as I know Ton did enable it recently for more builds.
https://td-er.nl/ESPEasy/latest/
Re: add SG90 servo
The SERVO feature is enabled in nearly all builds since about 1 month.
Exceptions are the MINIMAL and 1MB Flash-size builds for ESP8266.
Exceptions are the MINIMAL and 1MB Flash-size builds for ESP8266.
/Ton (PayPal.me)
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 19 guests