Pages: 1 [2]   Go Down
Author Topic: Controller des leds avec une radio 2.4ghz  (Read 2198 times)
0 Members and 1 Guest are viewing this topic.
Paris
Offline Offline
Sr. Member
****
Karma: 2
Posts: 368
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, tous les voyants sont donc au vert pour toi smiley-wink
Logged

EN: Libraries are my Gurus, they make me believe anything they want !
FR: Les librairies sont mes gourous, elles me font croire ce qu'elles veulent !

Bias
Offline Offline
Jr. Member
**
Karma: 0
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

bientôt plus que la carte Arduino Nano a commandait chez Hobbyking

je te montre le code ,car j'ai un problème a ce point :
Quote
digitalWrite(ledPin2,HIGH);

et voici le code entier (j'ai surligner en jaune où commence le problème) :
Quote
const int ledPin1 =  3;
const int ledPin2 =  4;
const int ledPin3 =  5;
const int ledPin4 =  6;
const int ledPin5 =  7;
const int ledPin6 =  8;



void setup(void)
{

  pinMode(ledPin1, OUTPUT);   
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);   
  pinMode(ledPin4, OUTPUT);
  pinMode(ledPin5, OUTPUT);   
  pinMode(ledPin6, OUTPUT);
}
void loop()
{
digitalWrite(ledPin1,HIGH); // led high
delay(500);
digitalWrite(ledPin1,LOW);

digitalWrite(ledPin2,HIGH); // led high
delay(500);
digitalWrite(ledPin2,LOW);

digitalWrite(ledPin3,HIGH); // led high
delay(500);
digitalWrite(ledPin3,LOW);

digitalWrite(ledPin4,HIGH); // led high
delay(500);
digitalWrite(ledPin4,LOW);

digitalWrite(ledPin5,HIGH); // led high
delay(500);
digitalWrite(ledPin5,LOW);

digitalWrite(ledPin6,HIGH); // led high
delay(500);
digitalWrite(ledPin6,LOW);

digitalWrite(ledPin1,HIGH); // led high
delay(1000)
digitalWrite(ledPin2,HIGH);
delay(1000)
digitalWrite(ledPin3,HIGH);
delay(1000)
digitalWrite(ledPin4,HIGH);
delay(1000)
digitalWrite(ledPin5,HIGH);
delay(1000)
digitalWrite(ledPin6,HIGH);
delay(3000)
digitalWrite(ledPin1,LOW);
digitalWrite(ledPin2,LOW);
digitalWrite(ledPin3,LOW);
digitalWrite(ledPin4,LOW);
digitalWrite(ledPin5,LOW);
digitalWrite(ledPin6,LOW);
delay(5000)
digitalWrite(ledPin1,HIGH);
digitalWrite(ledPin2,HIGH);
delay(1000)
digitalWrite(ledPin3,HIGH);
digitalWrite(ledPin6,HIGH);
delay(1000)
digitalWrite(ledPin4,HIGH);
digitalWrite(ledPin5,HIGH);
delay(1000)

digitalWrite(ledPin1,LOW);
digitalWrite(ledPin2,LOW);
digitalWrite(ledPin3,LOW);
digitalWrite(ledPin4,LOW);
digitalWrite(ledPin5,LOW);
digitalWrite(ledPin6,LOW);
delay(2000)
}
Logged

Paris
Offline Offline
Sr. Member
****
Karma: 2
Posts: 368
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Manque les points-virgules en fin de lignes "delay(1000)" ?
Logged

EN: Libraries are my Gurus, they make me believe anything they want !
FR: Les librairies sont mes gourous, elles me font croire ce qu'elles veulent !

Bias
Offline Offline
Jr. Member
**
Karma: 0
Posts: 94
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

a oui ,sa marche beaucoup mieux comme sa ! merci
Logged

Pages: 1 [2]   Go Up
Jump to: