Mega Grove Shield Python firmata

I got my Arduino Romeo + Grove Base Shield and Python PyFirmata working properly. Just that i need more PWM which is not possible on the Grove base shield.

I bought Grove Mega Shield and put this on Arduino Mega 2560, and try to connect this to my Python Pyfirmata and it does not work!

Error = SerialException: could not open port ‘/COM16’: WindowsError(2, ‘The system cannot find the file specified.’)

I have tested using Arduino IDE, it works and there is no problem with my Mega or the Mega Grove Shield.

I have tried changing the port number to 1 and 2, from the Control Panel-Port-Advanced.
Arduino can recognize the shield, but not Python Pyfirmata.

Please help.


Dear All,

Sorry, forgot to check the MEGA ADK without the shield.
It looks like that PyFirmata does not work with Mega ADK with or without the Shield.
Sorry for the mistake.

Kind regards,

Dear All,

Saw this post -
For PyFirmata to work with Mega, it need additional work.
Will try to get it to work, and display the result here later,


Dear All,

ok, got it working. Thanks to … mmary.html

The right way of getting PyFirmata to read Mega and the Mega Grove shield is like this-

from pyfirmata.util import Iterator
from pyfirmata import ArduinoMega
board = ArduinoMega(‘COM16’) # Arduino usb port
iterator = Iterator(board)
servo = board.get_pin(‘d:4:s’) # pin PWM no 2
servo.write(50) # set servo position 0-255

with Mega Grove you get extra pwm out