Arduino-esp32: WiFi.h is not working on my esp32

Created on 20 Feb 2017  ·  17Comments  ·  Source: espressif/arduino-esp32

I'm new to ESP32.I did one sample code in arduino.

void setup() {
pinMode(4, OUTPUT);
Serial.begin(115200);
}
void loop() {
Serial.println("HELLO");
digitalWrite(4, HIGH);
delay(1000);
digitalWrite(4, LOW);
delay(1000);
}
but the same code is not working with WiFi.h

include

void setup() {
pinMode(4, OUTPUT);
Serial.begin(115200);
}
void loop() {
Serial.println("HELLO");
digitalWrite(4, HIGH);
delay(1000);
digitalWrite(4, LOW);
delay(1000);
}
Please help me

awaiting response

All 17 comments

just including WiFi.h would not change a thing. Are you sure you are not missing something else? Also what exactly "same code is not working with WiFi.h" means? Post some serial output ;)
Check your USB cable (starting WiFi uses lots of power). Things like that could help.

Hi @me-no-dev,
Thank you very much for responding as soon as possible.

with the code below

void setup() {
Serial.begin(115200);}
void loop() {
Serial.println("HELLO ALL");
delay(1000);
}
I got this output.
output1

After including WiFi.h i got the below error

include

void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("HELLO ALL");
delay(1000);
}
output2

It shows there is some error in WiFi.h (error: no members matching 'WiFiScanClass::MODE' in 'class WiFiScanClass') How to solve this?
Please help me.

Thanks and Regards,
Senthan

Can you try with the latest Arduino IDE? 1.8.1?

I tried with that.While trying with Arduino IDE 1.8.1 it show no error and shows nothing in the serial monitor also

problem is that you have some library named WiFi in your Arduino libraries folder. Remove that or rename it (folder and headers) :)

Thank you very much @me-no-dev @andrei-ivanov
I tried that and i got below error. It shows CPU halted
arduino_output

now make sure that you have a good usb cable and power to your board ;) maybe try external power?

I'm really sorry. I forget to inform that I got this error when i used "WiFi.begin(ssid,pass);" and it shows there is no "WiFi.mode()" in WiFi. h

Thank you very much for your responses.I got "CPU HALTED" when i include "WiFI.begin()". I tried with espressif/esp-idf#242 .It shows like the below image.
commandimg
please help me.
Regards,
Senthan

check you USB cable. Try external power

Gracias por la ayuda, yo tuve el mismo problema, me arrojaba el error CPU halted, lo que hice fue cambiar la fuente de alimentación por una de mayor corriente y funciono perfectamente. Espero que les funcione.

@Alexandravq нямам никаква идея какви ми ги пишеш...

Is this still a problem?

@Senthanamuthan if you rename the Documents/Arduino/libraries/Wifi/ folder to /Wifi.old/ and hit "compile" button, do you still get the error ?

[edit] I'm using Arduino for multiple environments/sdk and I had to do this to get rid of the same error message. Don't delete the folder as it is probably needed by your other profiles.

From #218 : also around Arduino IDE and ESP32 as my question is #281 ( only is bluetooth running ?)

For your information, i have recompiled yesterday for the ESP32 this wifibluetoothswitch.ino and other example under Arduino 1.6.13 without any problem, ok under PC with W10,

The hardware esp32 was set in the hardware directory for esp32-arduino github...
It looks ok for other wifi example too... Python is 2.7.12 on my PC..

If this can help you but for me, ESP32 et Arduino is better now.. from here : https://github.com/espressif/arduino-esp32 and follow under Windows instructions with success..
After the download, the wifi is running but my question is for Bluetooth ...

Best Regards
JP

@JPB1JPB1 why are you spamming so many issues with your BT question?

Hello Espressif team

Please, is there a arduino weblink with full support and source code with the 3 interfaces at the same time with power consumption optimization , four bits sd card interface too..

Any weblink and information are welcome.
Br
Jp

Was this page helpful?
0 / 5 - 0 ratings