// Déclaration des constantes et variables

const int PinLED = 9;
const int PinTone = 8;
const int FreqTone = 440;
const int TimeSleep1 = 500;
const int TimeSleep2 = 500;


// Initialisation des entrées et sorties

void setup()
{
  pinMode(PinLED, OUTPUT);          
}


// Fonction principale en boucle

void loop()
{
  digitalWrite(PinLED, HIGH); 
  tone(PinTone,FreqTone);      
  delay(TimeSleep1);                      
  digitalWrite(PinLED, LOW);  
  noTone(PinTone);      
  delay(TimeSleep2);                       
}
