Servo.h Fehler Compilation

Beim Compilieren bekomme ich Fehlermeldungen.
In file included from C:\Users\bernd\Documents\Arduino\10_Servomotor\10_Servomotor.ino:10:
c:\Users\bernd\Documents\Arduino\libraries\ServoESP32\src/Servo.h:68:81: error: call to non-'constexpr' function 'const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = int]'
static const int TIMER_RESOLUTION = std::min(16, SOC_LEDC_TIMER_BIT_WIDE_NUM);
^
c:\Users\bernd\Documents\Arduino\libraries\ServoESP32\src/Servo.h: In member function 'T ServoTemplate::mapTemplate(T, T, T, T, T) const':
c:\Users\bernd\Documents\Arduino\libraries\ServoESP32\src/Servo.h:256:28: error: 'is_floating_point_v' is not a member of 'std'
if constexpr (std::is_floating_point_v) {
^~~~~~~~~~~~~~~~~~~
c:\Users\bernd\Documents\Arduino\libraries\ServoESP32\src/Servo.h:256:28: note: suggested alternative: 'is_floating_point'
if constexpr (std::is_floating_point_v) {
^~~~~~~~~~~~~~~~~~~
is_floating_point
c:\Users\bernd\Documents\Arduino\libraries\ServoESP32\src/Servo.h:256:49: error: expected primary-expression before '>' token
if constexpr (std::is_floating_point_v) {
^
c:\Users\bernd\Documents\Arduino\libraries\ServoESP32\src/Servo.h:256:50: error: expected primary-expression before ')' token
if constexpr (std::is_floating_point_v) {
^
Mehrere Bibliotheken wurden für "Servo.h" gefunden
Benutzt: C:\Users\bernd\Documents\Arduino\libraries\ServoESP32
Nicht benutzt: C:\Users\bernd\AppData\Local\Arduino15\libraries\Servo
Nicht benutzt: C:\Users\bernd\Documents\Arduino\libraries\Servo
exit status 1

Compilation error: exit status 1

Programm
Das ist ein Standartprogramm aus dem Internet!
<
/* Sweep
by BARRAGAN http://barraganstudio.com
This example code is in the public domain.

modified 8 Nov 2013
by Scott Fitzgerald

//http://www.arduino.cc/en/Tutorial/Sweep
*/
#include <Servo.h>

Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(4); // attaches the servo on pin 4 to the servo object
}

void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}

/>

Warum geht das nicht?

Im englischen Teil des Forum müssen die Beiträge und Diskussionen in englischer Sprache verfasst werden. Deswegen wurde diese Diskussion in den deutschen Teil des Forums verschoben.

mfg ein Moderator.

Setze Deinen Code und die Fehlermeldungen bitte in Codetags.
Wie das geht, steht hier.

Gruß Tommy

Und du nutzt auch einen ESP?

Ich habe einen Uno R3 von AZ-Delivery
Alles andere geht ja auch; nur dieses Servo.h nicht!

Ich bin doch hier im deutschen Teil! Oder?

Jetzt ja.

Gruß Tommy

Die Codetags ignorierst Du?

Gruß Tommy

Dann solltest du keine ESP Library nutzen!
Denn das kappt nicht.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.