Arduino Mega not responsive for servos after Pin no 19

Hi Everyone, after Pin No 19, data is reaching (LED on Arduino blinks) but servos are not moving. Tested with 2 different Mega board, and got the same result.

I’m suspicious that this might NOT be a VVVV gamma issue and might be directly related to “Standard Firmata” ino. Anyone had similar issues and fixed it somehow? Thank you.

B.

Hi Cy_Bers,

unfortunately I don’t have any Mega at hand to test it at the moment.
But maybe the issue is related to the config of the Pins? The FirmataDevice node is relying on the config of the pins. After restart the board’s firmata sends its config to the node. But you can also provide your own config (not all implementations of Firmata work the same way or implement all the features, although the one from the Arduino IDE should work as expected). There is an Advanced FirmataConfig node, would you please try it, like this:

image

Analog Pins are meant to be AnalogIn pins, unrelated to your servo issue, but maybe the pin count is off?

Aduino Mega’s pinout is here:

You are connecting your servos to the ~D0 - ~D13 pins, right?
These have PWM on them (probably also ~D44 - ~46 on the side of the board, according to the pinout PDF).

Please let me know if the FirmataConfig has helped. Thank you!

Best,
Anton

Thank you Anton, let me try and will update you for sure.

B.

Hi @robotanton , Firmata Config node indicates everything “0”. I tried to change the figures but nothing happened. May be I’m doing it wrong.

As indicated in the Debug output, my setup is between Input 2 to 31, and I have 30 servos. Even in the debug it shows all servos connected but after Pin 19, nothing moves.

Pls do let me know how can I manage firmata config. Thank you.

B.

Hi Cy_Bers,

yes, I’ve hoped, that defining the custom FirmataConfig will help. But looking at your screenshot - it looks like that the board sends the proper Capabilities report. Do you see there the pins after the Pin 19, right? The image is cropped at this pin. Debug just tells you about what you’ve set for the Board, but it doesn’t know if the board can handle it.

Here is a short explanation about the FirmataConfig. See also the patch attached.
I guess we need a board here, to properly test the situation.

image

FirmataConfig-Test.vl (6.0 KB)

Best,
Anton

1 Like

Thank you so much @robotanton , the patch you sent perfectly did the job. Even I didn’t change any of the index you set. All 30 servos working smooth now.

B.

Ah, good to know! Glad it works for you. Looks like it is related just to the Pin Count.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.