} void loop() { } [/color] And the circuit : https://imgur.com/a/iYkOT3H*_
_I know it's a mess, but i did my best to reproduce it* I want it to light up one LED after each other (like a wave) and make a faster "wave" after each "wave". But, it just light up the middle LED, then the left-bottom, the right-bottom, the middle one again but faster, and then the right-bottom stay lighted up. I checked if the LED weren't broke or something but everything was okay. I lighted up each of them individually without problems. I don't know what do to next, so i decided to ask for help here. If anyone have and idea, i will be grateful for their help. Thanks you. A french angry guy.
int time=500;
int pinLed[5]={2,6,4,3,5};
void setup() {
for (int i=1;i<7;i++)
{
pinMode(pinLed,OUTPUT);
digitalWrite(pinLed,LOW);
}
if you create an array of pin nrs, you should refer to them like this :
int time=500;
int pinLed[5]={2,6,4,3,5};
void setup() {
for (int i=0;i<5;i++)
{
pinMode(pinLed,OUTPUT); // an array starts at 0 and runs to the size-1
digitalWrite(pinLed[i],LOW);
}
the same here :
for (int p=0;p<5;p++) // go through your pins
{
digitalWrite(pinLed[p],HIGH);
delay(temps);
digitalWrite(pinLed[p],LOW);
//time=time-100; // do not substract you'll be running in minus, real soon
time=(time*9)/10; //but multiply by something a little less than 1
}