Timer

j ai fait un ptit essai avec quelque chose de cette structure la

#include <Wire.h>
#include <NXShield.h>
#include <NXTTouch.h>
#include <NXTLight.h>
#include <SumoEyes.h>
#include <ACCLNx.h>
#include <NXTUS.h>


//
// declare the NXShield(s) attached to your Arduino.
//
NXShield    nxshield;

//
// declare the i2c devices used on NXShield(s).
//

//
// declare analog devices attached to nxshields.
//
NXTTouch    touch1;


Void main()
{str= 100
serial.void(avancer)

}








Void Avancer()
{
    // Drive both motors forward and backward for a specific number of
    // rotations
    delay(1000);
    sprintf(str, "Both Motors Forward %d Rotations", rotations);
    Serial.println(str);
    str[0] = '\0';
    nxshield.bank_a.motorRunRotations(SH_Motor_Both, 
                     SH_Direction_Forward,
                     SH_Speed_Medium, 
                     rotations, 
                     SH_Completion_Wait_For,
                     SH_Next_Action_BrakeHold);
    delay(1000);
    sprintf(str, "Both Motors Reverse %d Rotations", rotations);
    Serial.println(str);
    str[0] = '\0';
    nxshield.bank_a.motorRunRotations(SH_Motor_Both, 
                     SH_Direction_Reverse,
                     SH_Speed_Medium, 
                     rotations, 
                     SH_Completion_Wait_For,
                     SH_Next_Action_BrakeHold);

    Serial.println("Bank B motors >>");
    
}