Cannot get any servo working ESP32

Hi folks, so I am attempting to get ESP32_SERVO working on my 32. Tried a few sketches with different drivers and pulling my hair out now!

Error as following....

C:\Program Files (x86)\Arduino\libraries\ESP32_Servo\src\ESP32_Servo.cpp: In member function 'void Servo::setTimerWidth(int)':
C:\Program Files (x86)\Arduino\libraries\ESP32_Servo\src\ESP32_Servo.cpp:232:21: error: statement has no effect [-Werror=unused-value]
         this->ticks << widthDifference;
                     ^
C:\Program Files (x86)\Arduino\libraries\ESP32_Servo\src\ESP32_Servo.cpp:236:21: error: statement has no effect [-Werror=unused-value]
         this->ticks >> widthDifference;
                     ^
C:\Program Files (x86)\Arduino\libraries\ESP32_Servo\src\ESP32_Servo.cpp: In member function 'int Servo::attach(int, int, int)':
C:\Program Files (x86)\Arduino\libraries\ESP32_Servo\src\ESP32_Servo.cpp:148:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1plus.exe: some warnings being treated as errors
Using library ESP32_Servo at version 1.0 in folder: C:\Program Files (x86)\Arduino\libraries\ESP32_Servo 
exit status 1
Error compiling for board ESP32 Dev Module.

Probably doing something daft, can anyone give me a nudge please?

What do you want to do?

@mil24 Installation and Troubleshooting is for Problems with the Arduino itself NOT your project. It says so in the description of the section. Therefore I have moved your post here. Please be more careful where you post in future.

You may want to read this before you proceed:-
how to get the best out of this forum

Well I just want to get the thing moving with a pot or angled variables atm tbh!

No, I mean what do you want that expression to do, arithmetically?

Where did you get this library? It obviously contains errors that used to be treated only as warnings but are now treated as errors. So it cannot be used any longer.
You should use another ESP32 servo library.
And please show your sketch ( don't forget the code tags ).

Ah thank you for that. I will have a go with another library then and get back :slight_smile:

I think you should install it by means of the library manager. Search for 'ESPServo'

Or search for 'mobatools' and use the MoToServo class of this lib :wink:

So this time the error has changed. Using the MoToServo library suggested by MicroBaner I get the following,

esptool.py v3.0-dev
Serial port COM5
Connecting........_
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 84:cc:a8:5e:59:38
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB
Compressed 8192 bytes to 47...

A fatal error occurred: Timed out waiting for packet content
A fatal error occurred: Timed out waiting for packet content

Which suggests there is now something else unrelated going on?

Obviously the sketch compiled, but there is a problem with uploading...
What is your ESP32 board? Did you ever succeed uploading a sketch to this board?

Yeah it's had lots of uploads... It is the generic dev board... I get info when I interrogate.. I'll take it home and try on a different computer...

Ah! I tried another board, then plugged this back in and it's all worked this time! Strange!

Just need to re-assign the pin output and fingers crossed!

Put all the hair back?