R RJB Active Member Licensed User Longtime User Jul 2, 2020 #1 I believe the ESP8266 and ESP32 use the same wifi library, is that true? when I try to run the same software on these two devices the I get different results. The 8266 is OK. The ESP32 gives following error: Code: Copy C:\Program Files (x86)\Arduino\libraries\ESP8266wifi-master/ESP8266wifi.h:23:26: fatal error: avr/pgmspace.h: No such file or directory what am I doing wrong? Thanks
I believe the ESP8266 and ESP32 use the same wifi library, is that true? when I try to run the same software on these two devices the I get different results. The 8266 is OK. The ESP32 gives following error: Code: Copy C:\Program Files (x86)\Arduino\libraries\ESP8266wifi-master/ESP8266wifi.h:23:26: fatal error: avr/pgmspace.h: No such file or directory what am I doing wrong? Thanks
thetahsk Active Member Licensed User Longtime User Jul 3, 2020 #2 A short look into the r8266wifi.h answered your question and choose the right board in the Board Selector. B4X: Copy #pragma once #include "B4RDefines.h" #ifdef ESP32 #include <WiFi.h> #include <WiFiClientSecure.h> #else #include <ESP8266WiFi.h> #endif #include <WiFiUdp.h> Upvote 0
A short look into the r8266wifi.h answered your question and choose the right board in the Board Selector. B4X: Copy #pragma once #include "B4RDefines.h" #ifdef ESP32 #include <WiFi.h> #include <WiFiClientSecure.h> #else #include <ESP8266WiFi.h> #endif #include <WiFiUdp.h>
R RJB Active Member Licensed User Longtime User Jul 3, 2020 #3 I'm using 'ESP32 Dev Module' for the ESP32 and 'Generic ESP8266 Module' for the 8266 so what am I missing here? Any help appreciated. Thanks Upvote 0
I'm using 'ESP32 Dev Module' for the ESP32 and 'Generic ESP8266 Module' for the 8266 so what am I missing here? Any help appreciated. Thanks
thetahsk Active Member Licensed User Longtime User Jul 3, 2020 #4 Post your complete Project. Have you installed the latest esp32 and esp8266 cores in your Arduino IDE ? Upvote 0
Post your complete Project. Have you installed the latest esp32 and esp8266 cores in your Arduino IDE ?
R RJB Active Member Licensed User Longtime User Jul 3, 2020 #5 esp8266 is working and I updated the arduino IDE and added esp32 to it before trying it yesterday. I also downloaded and installed B4R twice to make sure it wasn't that. I'll try removing and re-adding esp32/ 8266 again just in case. Then I'll strip down the project to the minimum that shows the problem before uploading it. Thanks Upvote 0
esp8266 is working and I updated the arduino IDE and added esp32 to it before trying it yesterday. I also downloaded and installed B4R twice to make sure it wasn't that. I'll try removing and re-adding esp32/ 8266 again just in case. Then I'll strip down the project to the minimum that shows the problem before uploading it. Thanks
R RJB Active Member Licensed User Longtime User Jul 5, 2020 #6 The problem was in some in-line C which had: #include <ESP8266WiFi.h> in it. I've used the code from #2 above to select as follows: Code: Copy #ifdef ESP32 #include <WiFi.h> #endif #ifndef ESP32 #include <ESP8266WiFi.h> #endif #else doesn't seem to be available here (error parsing....) thanks thetahsk for your help. Upvote 0
The problem was in some in-line C which had: #include <ESP8266WiFi.h> in it. I've used the code from #2 above to select as follows: Code: Copy #ifdef ESP32 #include <WiFi.h> #endif #ifndef ESP32 #include <ESP8266WiFi.h> #endif #else doesn't seem to be available here (error parsing....) thanks thetahsk for your help.