code issue

32:3: error: expected ‘}’ at end of input. This pops up with this code im using cuircuits.io and it highlights the last bracket as the error here is the code

int redled = 13;
int greenLED = 12;
int redontime = 250;
int greenontime = 500;
int redofftime = 500;
int greenOffTime = 500;
int greenblink = 7;
int redblink = 4;

void setup () {

pinMode(redled,OUTPUT);
pinMode(greenLED,OUTPUT);
}
void loop() {

for (int j=1; j<greenblink; j=j+1){
digitalWrite(greenLED,HIGH);
delay(100);
digitalWrite(greenLED,LOW);
delay(greenOffTime);
}

for (int j=1; j<=redblink; j=j+1){
{digitalWrite(redled, HIGH);
delay(redontime);
digitalWrite(redled, LOW);
delay(redofftime);

}
}

 for (int j=1; j<=redblink; j=j+1){
   {digitalWrite(redled, HIGH);

Pete

that didnt help it its still the same

Need one more } at the end to close out loop(). If you use CTRL-T it makes it more obvious.

You didn’t fix it properly then.

for (int j=1; j<=redblink; j=j+1){
   {digitalWrite(redled, HIGH);

All that’s required is to remove the opening brace before digitalWrite.

for (int j=1; j<=redblink; j=j+1){
   digitalWrite(redled, HIGH);

Pete

Yes, an extra { on the digitalWrite line, I see it now.

If you put the { on lines by themselves, you'd be able to see them.

Ifyoucan'tdothat,learntoexerciseyourdamnedspacekey.