I want to control a ServoMotor with THIS module:

I asked a question before in THIS topic.

And as you can see in the topic, they guided me perfectly. And they said I should use THIS code.

But I have a problem. This code seems to be not applied to that module. Because in the code, one of the pins of raspberry prepares to send the signal to the module:

    private final static int DEFAULT_PIN = 25;

While this module has two pins to receive a signal. (SDA & SCL) I think the code is for PWM modules. But the module has I2C.

How should I use the code for my module?

  • I don't speak/read the language on the page, but it looks to me like this board is a 5v board.
    – NomadMaker
    Jul 25, 2022 at 22:43
  • You can use it to drive servos, and there is a terminal to supply 6V tp 7.5V for servos. The logic signals can be 5V (or 3V3, I forgot)
    – tlfong01
    Jul 26, 2022 at 2:16
  • I2C is used from the pi to the board. The board then uses this information to created pwm signals for the servos.
    – NomadMaker
    Sep 14, 2022 at 13:53

1 Answer 1


You need to find or write Java code to drive that I2C servo module. It is based on the PCA9685 PWM chip. If you search for its datasheet it will show the I2C commands to use.

If you need to write your own code have a look at my Python based code which should be a reasonable place to start.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.