0

@Majenko's answer works like a charm. I did have to make some changes as follows:

Per Majenko, you need to change the Tools > Partition scheme. I used "No OTA (Large APP) as he suggested and it is now working.

However, the Partition Scheme option under Tools was not available for either of my devices (Huzzah32 or NodeMCU-32s). I changed my board type (Tools > Board) to "ESP32 Dev Module" and several additional options appeared under Tools, including Partition Scheme.

Original Question: I am not able to use both the WiFi.h and BLE libraries at the same time. Even the most minimal projects run out of memory during compile. Am I doing something wrong? I get identical results with both an Adafruit Huzzah32 and a NodeMCU-32S.

Does anyone know of a workaround, or barring that a suggested alternate board? A Raspberry pi zero W seems like overkill and the power consumption is ugly, so I don't want to do that unless I really have to.

#include <WiFi.h>
#include <BLEDevice.h>

void setup() {
  WiFi.mode(WIFI_MODE_STA);             // use a WiFi function
  BLEDevice::init("Minimal BLE WiFi");  // use a BLE function
}

void loop() { }

The error I get is

Arduino: 1.8.9 (Mac OS X), Board: "NodeMCU-32S, 80MHz, 921600"

Build options changed, rebuilding all Sketch uses 1443898 bytes (110%) of program storage space. Maximum is 1310720 bytes.

Global variables use 60208 bytes (18%) of dynamic memory, leaving 267472 bytes for local variables. Maximum is 327680 bytes. Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it. Error compiling for board NodeMCU-32S.

  • 1
    Could you please revert the question to the original state, we don't use "[SOLVED]" on titles nor post solutions inside questions. The best would be for you to post a new answer and move your solution there. Thanks! – brasofilo Oct 7 at 3:24
1

Yes. Select a partition scheme that gives you more room. For example "No OTA (Large APP)" gives you 3MB of program space.

  • This worked. I had to make make some changes to my Arduino IDE environment which I will add to my initial question. – Rob Sweet Jul 19 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.