PCF8574 Servo pin

Hi alle.

Sorry for this awkward question ...
How do I connect with the IDE the pcf8574 pins with the servos?
I mean (example):

// Set i2c address
PCF8574 pcf8574 (0x20);
pcf8574.pinMode (0, OUTPUT);
and
Servo servo1;
servo1.attach (servoPin);
It should be:
servo1.attach (pcf8574. ????)

A simple GPIO extender is not an ideal choice of device for servo control.

A 12 bit PWM device would be better

I'ld like to know the right code...
Not only for Servo.,.
I know should be better devices.

I don't think a simple I2C GPIO is quick enough to accurately control an RC servo.
Remember you need to accurately reproduce pulse lengths in the range 1 to 2 ms, consistently.

Thanks...
Maybe I'll use this one:
immagine

1 Like

Hello,
Where did you find this expansion module for ESP32-CAM?
Thank you

https://www.pcbway.com/project/shareproject/ESP32_Camera_Development_Board_Top_Circuit_Board.html