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?
@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.
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 ).
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?