Timer

alors:

#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 analog devices attached to nxshields.
//
NXTTouch  touch1;


Void main()
{
str= 100
avancer(str);// comme ça l'appel de fonction avec paramètre 

}




Void Avancer(int str)
{
int str;

    // 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';//bon reflex =)
    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 >>");
    
}

sinon c'est pas faut mais il faut un pointeur, ou un str défini en globale pour qu'il sois aussi présent dans ta fonction..

Voila.

Skizo !