Bonjour, je suis débutant, et j'ai un message d'erreur lorsque je vérifie ce code :
int pinBouton, pinLed;
boolean etatAllumage
void setup(){
Serial.begin(9600);
pinBouton=2;
pinLed=4;
etatAllumage=0;
pinMode(pinBouton, INPUT_PULLUP);
pinMode(pinLed, OUTPUT);
}
// put your setup code here, to run once:
void loop(){
Serial.print(etatAllumage);
if (etatAllumage)
{
digitalWrite(pinLed, HIGH);
}
else
{
digitalWrite(pinLed,LOW);
}
boolean etatPinBouton=digitalRead(pinBouton);
Serial.println(etatPinBouton);
if(!etatPinBouton)
{
if (etatAllumage)
{
etatAllumage=0;
}
else
{
etatAllumage=1;
}
}
delay(200);
// put your main code here, to run repeatedly:
}
Ils me mettent :
"expected initializer before 'void'"
Merci pour votre aide !