I have a toy usb robot arm which I have added potentiometers to and ran the 4 dc motors into the adafruit motor shield in points M1- M4. My potentiometers are reporting back to my VB.NET application just fine using FirmataVB and StandardFirmata on the arduino, I can control my robot arm in one direction with the test application on the output with digital pins but only in one direction.

Where do I start looking for the code to edit in order to make this able to run the DC motor in both forward and reverse given the variable, or is there something obvious I am missing? Has someone done this already? I can't find anything on it!

Well, I am using StandardFirmata.. so the same code that comes default with Arduino.. there is no code, only the test app which moves them only in one direction, which is why I have my question, How do I go about making them run in reverse? I've read on another forum I need to edit *something* in either the default Arduino StandardFirmata sketch or FirmataVB order to make it run both forward and backwards, this is where I don't know where to start

I am using 4 DC motors connected to the adafruit motor shield which use the digital ports

The potentiometers are from analog pins 0-3, they report to my VB.net application which uses FirmataVB to interface with the arduino, FirmataVB also includes access to the digital pins, although this currently only lets me move it in one direction when I set OUTPUT to HIGH.

I want to be able to control the 4 DC motors in both directions, and read the potentiometers which shows the position of each arm.

- Which of the default sketch examples included with Arduino is most appropriate as a base to start editing given what I need to do and the fact I need to use FirmataVB (?)

- How do I edit the sketch to include a variable which lets me control the direction of each motor, rather than setting the OUTPUT to HIGH or LOW (one direction, or stop)

- Will I need to include other items to achieve this? I've read some stuff about needing to import AFMotor.h or can I just make a few changes to the firmata sketch and FirmataVB?

I would be really grateful if you guys could point me in the right direction, the more I seem to read the more I am confusing myself.

The potentiometers are from analog pins 0-3, they report to my VB.net application which uses FirmataVB to interface with the arduino, FirmataVB also includes access to the digital pins, although this currently only lets me move it in one direction when I set OUTPUT to HIGH.

Seems to me that Firmata and your VB sketch between them contain the logic to drive the Arduino pins to send the required commands to the motor shield, and at the moment that logic is wrong. I suggest you read up on the pins used by the motor shield and what signals are needed on those pins to get the forward and reverse movements you require, and then correct the logic in Firmata/VB to provide those signals.

I only provide help via the forum - please do not contact me for private consultancy.

The set of pins used to control the shield are pretty straight forward and you should be able find them described in the documentation for your shield. You need to find the piece of code that coverts the abstract idea of 'turn motor on' to a set of signals written to output pins. This will presumably be in your VB or Firmata code. The documentation will tell you what signals you need to give the shield to make it do what you want. The VB/Firmata code will show you what it's actually doing. You need to see what the difference is, and fix the code so that it does the right thing.

Code samples showing how to control the motors directly from a sketch running on the Arduino may help you to confirm you understand what pins do what, but the code you need to fix is NOT Arduino code; it is your VB/Firmata code.

I only provide help via the forum - please do not contact me for private consultancy.