ai trouvé ça aussi... bon la c en rgb mais en admettant que je prenne que un contact (r g ou b) ça devrait marcher mais bof....
mon programme... bon je l'ai testé avec des leds 5 v mon script etait ok, donc j'ai plusieurs pin de sortie en digital puis une en analogique.
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(0, OUTPUT);
pinMode(2, OUTPUT);
pinMode(52, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // set the LED on
delay(50); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(50); // wait for a second
digitalWrite(12, HIGH); // set the LED on
delay(50); // wait for a second
digitalWrite(12, LOW); // set the LED off
delay(50); // wait for a second}
digitalWrite(11, HIGH); // set the LED on
delay(50); // wait for a second
digitalWrite(11, LOW); // set the LED off
delay(50); // wait for a second}
digitalWrite(2, HIGH); // set the LED on
delay(50); // wait for a second
digitalWrite(2, LOW); // set the LED off
delay(50); // wait for a second}
digitalWrite(11, HIGH); // set the LED on
delay(50); // wait for a second
digitalWrite(11, LOW); // set the LED off
delay(50); // wait for a second}
digitalWrite(12, HIGH); // set the LED on
delay(50); // wait for a second
digitalWrite(12, LOW); // set the LED off
delay(50); // wait for a second}
digitalWrite(12, HIGH);
digitalWrite(2, HIGH);
///
analogWrite(0, HIGH);
digitalWrite(52, HIGH);
///
// set the LED on
delay(1000); // wait for a second
digitalWrite(12, LOW);
digitalWrite(2, LOW); // set the LED off
analogWrite(0, LOW);
digitalWrite(52, LOW);
delay(50); // wait for a second}
}