J'ai fait un pti bout de code pour me faire comprendre.
Dans ce code, j'ai une variable x, on pourrait en avoir des tas à modifier par la même fonction. Est-il donc possible de faire ce que je tente et qui me marche pas, mais d'une manière propre et efficace?
byte x=0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("la variable x vaut");
Serial.println (x);
fonction(x);
delay(1000);
Serial.println("et maintenant");
Serial.println (x);
}
void loop() {
// put your main code here, to run repeatedly:
}
byte fonction(byte variable) {
variable++;
}