Compilation error - please help

screenshot of text removed

code:

const int LED=9;
void setup() {
  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);
}

void loop() 
{
  for
{
  (int i=100; i<1000; i=i+100)
  digitalWrite(LED, HIGH);
  delay(i);
  digitalWrite(LED, LOW);
  delay(i);                          
 }
}

compiler says:

Sketch_sep02a:17:1: error: expected primary-expression before '}' token sketch_sep02a:17:1: error: expected ')' before '}' token sketch_sep02a:17:1: e

help please

forgot to notice I'm using arduino ide 1.8... on my laptop windows 11

Welcome to the forum

  for
{
  (int i=100; i<1000; i=i+100)
  digitalWrite(LED, HIGH);

Check on the correct syntax of a C/C++ for loop

C++ For Loop


please never post a picture of text again. Just post the code with code tags. Same applies to compiler error messages. It's totally useless, eats up server resources for nothing and pollute the planet / increases everyone's energy bill as it's heavier to download and clutters the internet...

2 Likes

Your topic has been moved to a more suitable location on the forum as this has nothing to do with Avrdude, stk500 or Bootloader.

So close... try swapping these 2 lines around.

1 Like

thanks dude, u r best)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.