Hi folks,
I am working on a project using the Rpi Pico W, using DMX (RS485) to control 12 servo's with a web interface to configure.
I have run into a problem where when I loop to attach the servo 1-12 only the first 6 becomes active. I have tried different combinations of pins, and it is always just the first 6, 7-12 that do not start PWM output.
The documentation I have read says the Pico can support 8 pairs of 16 PWM outputs as long as the frequency (not the duty cycle) is the same on each pair, which in my case it is.
I am using the standard servo.h 1.1.8 from Arduino on the 2.0 IDE.
Does anyone have any suggestions or thoughts?
By the way, I used a scope to verify that the pins in question do not have a PWM signal. I should also add I am using a Rpi Pico W.
Welcome to the forum
Please post your sketch, using code tags when you do
Here is the test code I have been using. After running this, I use an O-Scope to look for PWM output on the GPIO pins. Only the first six have output.
// Test coce, used O-Scope to look for PWM output on pins 0-11
#include <Servo.h>
Servo servoPin[12];
void setup() {
for (uint i = 0; i < 12; i++) {
servoPin[i].attach(i,600,2200);
}
}
void loop() {
}
Thanks, I should have posted my test code as I have worked through this issue. It is pretty simple. See thread
Another Update. I tried the sketch above in this thread on another RPi Pico and got the same results. I am sure I am doing something stupid. Any help would be appreciated.
That will not work on the Pico, it uses timers that a Pico simply does not have.
Are you certain that is what is being called up?
I don't know about the Mbed platform but on the "earle phil hower" system there is an example of getting PWM to work on a Pico but I haven't looked at it in detail to see any limitation.