Skip to content

Nano RP2040 Servo pulsewidth imprecision #1019

Open
@gxy812

Description

@gxy812

Observed downward fluctuations of more than ~30 us when writing a 1500 us pulse to 7 different pins.
Caused a lot of random spinning as I was using the signal for ESCs.

Used the Servo.h library as provided by this core.

const byte motor_pins[7] {2, 3, 5, 6, 9, 10, 11};
Servo motors[7];

void setup() {
    for (int i = 0; i < NUM_MOTORS; i++) {
        motors[i].attach(motor_pins[i]);
        motors[i].writeMicroseconds(1500);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions