Spider and Motor Driver L298 Module

Hello everyone,
I am a student in computer science in France. In the context of a robotic project, I use the FEZ Spider card. I contact you
because I have a problem with the Motor Driver L298 Module.

I made several tests with the Cerberus card everything goes well. But when I adapt my program to map the Spider card nothing happens. Whether on port 8 or port 11 LED lights 2 and 4 on module loading. Then everything will turn off when the program is ready.

My program (which tells me no problem) is tested to simplify the following:

Program.cs

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 GHI.Premium.Hardware;

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

namespace GadgeteerApp5
{
    public partial class Program
    {
        CBallon ballon; 
        void ProgramStarted()
        {
            Debug.Print("Program Started");
            ballon = new CBallon(motorControllerL298);

            ballon.gonfler(100);
            Thread.Sleep(10000);
            ballon.stoper();
         }
    }
}

CBallon.cs

using System;
using Microsoft.SPOT;

namespace GadgeteerApp5
{
    class CBallon
    {
        Gadgeteer.Modules.GHIElectronics.MotorControllerL298 motorControllerL298;

        public CBallon(Gadgeteer.Modules.GHIElectronics.MotorControllerL298 motorController)
        {
            motorControllerL298 = motorController;
        }

        public void gonfler(int vitesse)
        {
            motorControllerL298.MoveMotor(Gadgeteer.Modules.GHIElectronics.MotorControllerL298.Motor.Motor1, vitesse);
        }

        public void stoper()
        {
            motorControllerL298.MoveMotor(Gadgeteer.Modules.GHIElectronics.MotorControllerL298.Motor.Motor1, 0);
        }
    }
}

The motor is connected to a motor 12V 3A.

Thank you in advance.

Did you add power to the motor controller? Show a picture please.

Yes of course

Looks correct. Not sure why.

You are testing the device in the ProgramStarted code, but you can’t assume that the system is stable at that point.

            ballon.gonfler(100);
            Thread.Sleep(10000);
            ballon.stoper();

You should put that into a timer-tick based section of code. At the moment it’s not until AFTER the ballon.stoper() call that the code is potentially “ready”.

If you want a more thorough test I would add a start/stop toggle in a button press and attach a button.