Hey guys,
My name is phil and i'm a complete noob to arduino's and micro controllers, well electronics as a whole to be fair.
I have been making my way through an ardx experimental kit and i'm having trouble with the following code ARDX: Kumpulan Situs MPO Paling Gacor Anti Rungkad Terbaru 2023 . I have been trying to get this code to light 8 LED's in a sequence starting from the middle but whenever i try to compile it i get a few errors. I was hoping some more experinced guys could have a look and tell me where i went wrong?
int ledPins[] = {2,3,4,5,6,7,8,9};
void setup()
{
for(int i = 0; i < 8; i++){
pinMode (ledPins[i],OUTPUT);
}
void loop()
{
inAndOut(){
int delayTime = 200;
for(int i = 0; <=3; i++){
int offLED = i -1;
if(i == 0){
offLED = 3;
}
int onLED1 = 3 - i;
int onLED2 = 4 - i;
int offLED1 = 3 - offLED;
int offLED2 = 4 - offLED;
digitalWrite(ledPins[onLED1], HIGH);
digitalWrite(ledPins[onLED2], HIGH);
digitalWrite(ledPins[offLED1], LOW);
digitalWrite(ledPins[offLED2], LOW);
delay (delayTime);
}
Thanks so much guys
phil