Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Ronald L
#14481 Hi I am working on a simple system that pulls data from a website and displays it on a 128x64 Oled display.
I am using Mike Rankin's Oled code, which runs fine. The Web code is pretty much standard and works fine if the display code is not present (and thus reporting through Serial). When I combine the Oled code and the Wifi code, I get WDT reboots and the code does not seem to run at all.

Here is the minimal code (only including Wire.h is enough to cause the WDT resets). Uncommenting all oled code (and incorporating all support functions produces the same result).

#include <ESP8266WiFi.h>
const char* ssid = "....";
const char* password = ".......";
#include <Wire.h>
//---------------FONT + GRAPHIC-----------------------------//
#include "data.h"
//==========================================================//

// OLED I2C bus address
#define OLED_address 0x3c

void setup()
{
// Wire.pins(0, 2); //0=SDA, 2=SCL, 2 also =LED

// Initialize I2C and OLED Display
// Wire.begin();

// init_OLED();
// reset_display(); // Clear logo and load saved mode

// We start by connecting to a WiFi network

Serial.println();
Serial.println();
Serial.print("Connecting to ");
// sendStrXY("Connecting to ",0,0);
Serial.println(ssid);
//sendStr(ssid);
WiFi.begin(ssid, password);

// sendStrXY(".",0,1);

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
// sendStr(".");
}
//
Serial.print("Wifi connected");
//sendStrXY("WiFi connected ",0,0);
}

void loop() {
delay(500);
}

----
this is what the module sends through Serial
wdt reset
load 0x40100000, len 28036, room 16
tail 4
chksum 0x8a
load 0x3ffe8000, len 4364, room 4
tail 8
chksum 0x2f
load 0x3ffe9110, len 1948, room 0
tail 12
chksum 0xec
csum 0xec
-----

Am I doing anything wrong, or is this a bug?

BTW code is loaded into two segments in memory:
Uploading 34384 bytes from /../test.cpp_00000.bin to flash at 0x00000000
Uploading 165736 bytes from /..../test.cpp_40000.bin to flash at 0x00040000
User avatar
By reaper7
#14503 I see that You do not initialize serial,
try to add
Code: Select all  Serial.begin(115200);
  delay(10);

as a first setup instructions