Skip to content

Esp8266 2.4.1 update issue #4605

@ghost

Description

jeesonraphael
Hi,
I have installed esp8266 v 2.4.1 by using board manager. During the time of compiling there showing an error -- functions are " not declared in this scope ". But if I moved that function to the top of "void setup()" code is running smoothly. I am just a beginner in this.

. . . . error code . . . . .

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}


void loop() {
  Led();
}


void Led() {
  digitalWrite(LED_BUILTIN, LOW);   
  delay(1000);                      
  digitalWrite(LED_BUILTIN, HIGH);  
  delay(2000);
}

. . . . error message . . . . .

Arduino: 1.6.9 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

WARNING: Spurious .github folder in 'IRremoteESP8266' library
C:\Users\jeesonraphael\Desktop\Blink\Blink.ino: In function 'void loop()':

Blink:8: error: 'Led' was not declared in this scope

   Led();

       ^

exit status 1
'Led' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

. . . . . running code . . . . .

void Led() {
 digitalWrite(LED_BUILTIN, LOW);
 delay(1000);
 digitalWrite(LED_BUILTIN, HIGH);
 delay(2000);
}


void setup() {
 pinMode(LED_BUILTIN, OUTPUT);
}


void loop() {
 Led();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions