I want to use THIS sample in my project. But its library is for pi4j version 1 and I use the pi4j version 2. I searched and I didn't find any sample for PCA9685 with pi4j2. Is there anyone who can help me?
Adafruit has a very nice guide on this with some easy to follow instructions. You can find it at" https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi" There are several tutorials on line to help you. I used "raspberry pi PCA9685" as the search term. This may not completely solve your problem but it is a good start.