So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Barnabybear
#72234 Hi, if you use an output pin that doesn't support SPI you will get the notification but it should still compile and run. Off hand pin 2 on the ESP is SPI data (SDA) - pin14 is the clock to match that (SCL) but you don't need to use that.
User avatar
By sofos1990
#72292
btidey wrote:Add
Code: Select allWiFi.mode( WIFI_OFF );
WiFi.forceSleepBegin();


into setup()


Hmm...I might be doing something wrong but it doesn't work for me.
1111.JPG


I get the "'WiFi' was not declared in this scope" error.


Barnabybear wrote:Hi, if you use an output pin that doesn't support SPI you will get the notification but it should still compile and run. Off hand pin 2 on the ESP is SPI data (SDA) - pin14 is the clock to match that (SCL) but you don't need to use that.


Great that works!
PinD2 works I just have to write the GPIO number which is 4. So I chose the wrong pin it seems. Thank you!
You do not have the required permissions to view the files attached to this post.
User avatar
By sofos1990
#72313
martinayotte wrote:
sofos1990 wrote:I get the "'WiFi' was not declared in this scope" error.


Code: Select all#include <ESP8266WiFi.h>


Cool yeah now it works but I'm not sure if it's right or not.
If I put it inside a separate setup() I can't compile the sketch giving me the following error.
1.JPG


If I include it into the setup() that exists already in the sketch I can compile it.
2.JPG
You do not have the required permissions to view the files attached to this post.