Hydra and L298 Motor driver

when I deploy to the Hydra I get this error

An unhandled exception of type ‘Gadgeteer.Socket.PinConflictException’ occurred in Gadgeteer.dll

Additional information:
Unable to configure the MotorControllerL298 module using socket 7 (pin 7). There is a conflict with the MotorControllerL298 module using socket 7 (pin 7). Please try using a different combination of sockets.

I Think I am using the most up to date firmware and drivers I am using the sample code from the help file on the L298


using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace HydraBot1
{
    public partial class Program
    {
        MotorControllerL298 motorController = new MotorControllerL298(7);

        //MotorControllerL298 motorController = new MotorControllerL298(11);


        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            // Set the motor speeds to 0
            motorController.MoveMotor(MotorControllerL298.Motor.Motor1, 0);
            motorController.MoveMotor(MotorControllerL298.Motor.Motor2, 0);

            // Switch this to test the threaded movement
            // true = threaded
            bool bThreaded = false;

            if (bThreaded)
            {
                // Start one motor on its own thread
                motorController.MoveMotorRampNB(MotorControllerL298.Motor.Motor1, 100, 5000);

                // Wait so we can see the other start
                Thread.Sleep(500);

                // Start the other motor on its own thread
                motorController.MoveMotorRampNB(MotorControllerL298.Motor.Motor2, -100, 5000);
            }
            else
            {
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor1, 100, 5000);
                Debug.Print("going down");
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor1, 0, 5000);
                Debug.Print("going more down");
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor1, -100, 5000);
                Debug.Print("going up");
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor1, 0, 5000);
                Debug.Print("more up");
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor1, 100, 5000);

                Debug.Print("OTHER SIDE");

                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor2, 100, 5000);
                Debug.Print("going down");
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor2, 0, 5000);
                Debug.Print("going more down");
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor2, -100, 5000);
                Debug.Print("going up");
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor2, 0, 5000);
                Debug.Print("more up");
                motorController.MoveMotorRamp(MotorControllerL298.Motor.Motor2, 100, 5000);

                Debug.Print("Program Started");
            }
        }
    }
}

I have been away from this for a while so most likely it is something stupid

What modules you have connected?

Sean, can you tweak the CODE tags on your post? The initial tag has a CR in it:

[code
]

So the code is next to difficult to follow.

Modules I have connected are just the power connected to socket 2 and the motor driver connected to socket 7. I think socket 7 is the only one on the Hydra that supports PWM

I think I fixed the Code in post

The code is just a cut and paste from the sample provided when you press F1 on the module in the designer the only change I made is the sample is for the Spider using socket 11 so I changed it to 7.

The odd thing is I only get the error when I deploy to the device and when I break out of the load it brings me to the auto generated code. Maybe I have

motorController =

Wrong

Why this?

MotorControllerL298 motorController = new MotorControllerL298(7);

The designer does this for you.

OK yes that line did not need to be there and I needed to change motorController to motorControllerL298. here is the bot

Nice! Looking forward to seeing it in action.

Is that a camera on the front?

no it’s a ultrasonic distance sensor

https://www.sparkfun.com/products/639?

JgPAjHnp0cs

Very cool - those wheels are moving very quick!

So is the logic – if there’s something in the front, then turn? My reason for asking, is when you turn it toward the monitor, the right wheel stopped.

This was a test of the sample code for the motor driver I have not implemented the sensor the code turns on one motor forward then backward then starts the other motor forward then backward then both forward.

In my book
shameless plug http://www.amazon.com/The-Complete-Idiots-Guide-Electronics/dp/1615640959/ref=sr_1_1?ie=UTF8&qid=1347499488&sr=8-1&keywords=complete+idiots+guide+to+electronics+101

I made a similar robot but with a Netduino and the same distance sensor now I am trying to get it to work on Gadgeteer