-1

I am trying to use an Adafruit PCA9685 servo driver module with an ELEGOO Mega 2560 board.

I am supplying the servo driver board with 5 V and tested all the wires to make sure. I tested the servo without the board and it works fine.

enter image description here

I2CScanner code:

#include "I2CScanner.h"
I2CScanner scanner;
void setup() 
{
 Serial.begin(9600);
 while (!Serial) {};
 scanner.Init();
}
void loop() 
{
 scanner.Scan();
 delay(5000);
}
ocrdu
1,7953 gold badges12 silver badges24 bronze badges
asked Feb 10, 2024 at 15:49
8
  • What exact board is this? Looks like an Arduino Due, in which case you would be using the wrong pins. Try to use the pins labeled "SCL" and "SDA". Commented Feb 10, 2024 at 16:08
  • @PMF the exact board i am using is the elegoo mega 2560 and have put the pins in the "SCL" and "SDA" near the "AREF" Commented Feb 10, 2024 at 16:15
  • 1
    I'm not exactly sure about this board, but have you tried the other pins marked "SCL" and "SDA" (Pin 20/21 I think, near the green Led) Commented Feb 10, 2024 at 16:17
  • @PMF It should be the exact same as the Arduino Mega 2560, I have tried those pins also the older version "A4" and "A5" pins but it still didn't detect anything. Thx for helping btw. Commented Feb 10, 2024 at 16:20
  • what is the result when you run the code? ... please copy and paste into your post... no pictures please Commented Feb 10, 2024 at 19:05

1 Answer 1

0

The I2C bus needs a set of pull up resistors. When buying assembled I2C devices, the designer may include I2C pull up resistors but not connect them. This is because, according to this sparkfun.com tutorial, you only need about 4.7K Ohms of pull up resistance. Adding multiple I2C boards to the same bus all with their own pull up resistors will lower this resistance and may damage I2C drivers. So, it is up to the end-user to decide which I2C board to connect the pull up resistors on.

answered Feb 10, 2024 at 16:08
1

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.