Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP8266 & using Tabs gives (was not declared in this scope) #1669

Closed
questuk opened this issue Feb 23, 2016 · 3 comments
Closed

ESP8266 & using Tabs gives (was not declared in this scope) #1669

questuk opened this issue Feb 23, 2016 · 3 comments

Comments

@questuk
Copy link

questuk commented Feb 23, 2016

Using
V1.6.7 IDE
ESP8266 V2.1.0 -rc2
NodeMCU 1.0

I tried the following

BasicOTA.zip

If you have code on another TAB, it gives this error:

"Arduino: 1.6.7 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"

In function 'void setup()':

BasicOTA:8: error: 'test' was not declared in this scope

test();
^
exit status 1
'test' was not declared in this scope

Regards

Gaz

@krzychb
Copy link
Contributor

krzychb commented Feb 23, 2016

Hi Gaz,

This issue is tracked under #1066

A workaround is to declare function prototype before first use

void test();

void setup() 
{
  Serial.begin(115200);

  test();

}

Krzysztof

@lrmoreno007
Copy link
Contributor

Hi!!

Rename IO.ino to IO.h and:

#include <ESP8266WiFi.h>
#include "io.h"

void setup() {
  Serial.begin(115200);
  test();
}

void loop() {
  delay(1000);
}

But it's not a issue, close it. And please use www.esp8266.com forum.

Regards

@igrr
Copy link
Member

igrr commented Feb 27, 2016

This issue is fixed in the nightly builds of Arduino IDE, so i'm closing this ticket.

@igrr igrr closed this as completed Feb 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants