ESP32 always resetting

hi everybody!!!...im confuse,because sudenly my esp32 always resetting like this in serial monitor:

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40080f85  PS      : 0x00060530  A0      : 0x800d0da3  A1      : 0x3ffb1f60  
A2      : 0x00000005  A3      : 0x00000005  A4      : 0x00000022  A5      : 0x00000012  
A6      : 0x00400080  A7      : 0x00000001  A8      : 0x3f400eec  A9      : 0xffffffff  
A10     : 0xffffffff  A11     : 0x0000006c  A12     : 0x08000000  A13     : 0x3ffb884c  
A14     : 0xffffffff  A15     : 0x00000040  SAR     : 0x0000001a  EXCCAUSE: 0x0000001c  
EXCVADDR: 0xffffffff  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  

ELF file SHA256: 0000000000000000

Backtrace: 0x40080f85:0x3ffb1f60 0x400d0da0:0x3ffb1f80 0x400d3c26:0x3ffb1fb0 0x400869bd:0x3ffb1fd0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40080f85  PS      : 0x00060530  A0      : 0x800d0da3  A1      : 0x3ffb1f60  
A2      : 0x00000005  A3      : 0x00000005  A4      : 0x00000022  A5      : 0x00000012  
A6      : 0x00400080  A7      : 0x00000001  A8      : 0x3f400eec  A9      : 0xffffffff  
A10     : 0xffffffff  A11     : 0x0000006c  A12     : 0x08000000  A13     : 0x3ffb884c  
A14     : 0xffffffff  A15     : 0x00000040  SAR     : 0x0000001a  EXCCAUSE: 0x0000001c  
EXCVADDR: 0xffffffff  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  

ELF file SHA256: 0000000000000000

Backtrace: 0x40080f85:0x3ffb1f60 0x400d0da0:0x3ffb1f80 0x400d3c26:0x3ffb1fb0 0x400869bd:0x3ffb1fd0


and this sudenly happen in my oled.


before,because previously I was suspicious, why my OLED screen always flickers. I think it's because my cable broke. Then I tried to justify my cable suddenly this happened.

What power supply are you using to power all of that?
ESP32 constant resets can sometimes be a power issue.

i use 5v dc output from my laptop.before i asembly my project,it could work fine.

You're powering an OLED screen, Humidity sensor, GPS receiver, and an ESP32 from your laptop port?

actually i powering all of my sensor to 3.3 vdc output ESP32.and my esp32 receive power 5v dc from my computer.

After you have installed the ESP32 Exception Decoder, look it up on the internet, into the Arduino IDE and have put the debug info into the decoder, what is the decoded message that you get?

Oh, and your code, posted in code tags, may be very important in solving this issue.

ive try my code in arduino uno and its work.

I don't think that is a viable setup, even if it did work for a while I believe you may have fried a voltage regulator.

Have you taken a look at the spec sheet of the 3.3V regulator on your development board? I am going to guess it good for about 250mA. About the max draw of an ESP32.

OK, keep your code secret. See how well that works out for you.

That exception decoded message is?

its my code:

//define RX,TX

//#define RXp2 16
//#define TXp2 17
#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>

Adafruit_SSD1306 lcd(128, 64, &Wire, -1);

#define btnUp   7
#define btnOk   6
#define btnDown 5
#define btnBack 4
#define Buzz 13
///ini program esp
//#include <WiFi.h>
//#include "CTBot.h"
////variabel untuk bot telegram
//CTBot myBot;
////konfigurasi koneksi ke wifi
//const char* ssid = "Ngaji sam";
//const char* pass = "dikunci1";
////variabel token id telegram
//String token = "1779766605:AAE74wbTMW4D70FvmhKs0fXZJKKJDVii13k";
//const int id = 809915526;
//String dataIn;
//String dt[10];
//int i;
//int rpm = 0;
//float cadence = 0;
//float Odo = 0;
//float Trip = 0;
//float Speed = 0;
//float torsi = 0;
//float batt = 0;
//float TripNow = 0;
//float OdoNow = 0.0;
//boolean parsing=false;
//float keliling = 1.57;
//int a = dt[0].toInt();
//int b = dt[1].toInt();
//float c = dt[2].toFloat();
//int   d = dt[3].toInt();
//float e = dt[4].toFloat();
//float f = dt[5].toFloat();
//define my buzzer
unsigned long interval=1000; // the time we need to wait
unsigned long previousMillis=0; // millis() returns an unsigned long.
//////////// 
bool ledState = true; // state variable for the LED
bool statusBtnUp   = false;
bool statusBtnOk   = false;
bool statusBtnDown = false;
bool statusBtnBack = false;

bool statusAkhirBtnUp   = false;
bool statusAkhirBtnOk   = false;
bool statusAkhirBtnDown = false;
bool statusAkhirBtnBack = false;

bool UP   = false;
bool _OK   = false;
bool DOWN = false;
bool BACK = false;

int halaman  = 1;
int menuItem = 1;

void setup() {
  //buzzeron
 pinMode(Buzz, OUTPUT);
 digitalWrite(13, ledState);
 ///
  Serial.begin(115200);
  lcd.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  lcd.clearDisplay();
  pinMode(Buzz,OUTPUT);
  pinMode(btnUp,   INPUT_PULLUP);
  pinMode(btnOk,   INPUT_PULLUP);
  pinMode(btnDown, INPUT_PULLUP);
  pinMode(btnBack, INPUT_PULLUP);
}

void loop() {
  resetbuzzer();
  tampil();
  interupt();
  
}


//semua yang tampil di lcd ada di fungsi ini
void tampil() {
////////////////isi hal 1//////////////////
  if (halaman == 1) {
    lcd.clearDisplay();
    lcd.setTextSize(1);
    lcd.setTextColor(WHITE);
    lcd.setCursor(30, 0);
    lcd.print("E-BIKE PENS");

    if (menuItem == 1) {
      lcd.setCursor(5, 17);
      lcd.setTextColor(WHITE);
      lcd.print("> KM/h");
    } else {
      lcd.setCursor(5, 17);
      lcd.setTextColor(WHITE);
      lcd.print("  kecepatan sepeda");
    }

    if (menuItem == 2) {
      lcd.setCursor(5, 27);
      lcd.setTextColor(WHITE);
      lcd.print("> Volt");
    } else {
      lcd.setCursor(5, 27);
      lcd.setTextColor(WHITE);
      lcd.print("  Voltase baterai");
    }

    if (menuItem == 3) {
      lcd.setCursor(5, 37);
      lcd.setTextColor(WHITE);
      lcd.print("> Ampere");
    } else {
      lcd.setCursor(5, 37);
      lcd.setTextColor(WHITE);
      lcd.print("  Arus baterai");
    }

    if (menuItem == 4) {
      lcd.setCursor(47, 47);
      lcd.setTextColor(WHITE);
      lcd.print("> Next");
    } else {
      lcd.setCursor(47, 47);
      lcd.setTextColor(WHITE);
      lcd.print("  Next");
    }

  } 
   ///////////////isi halaman 2-3////////////////
  else if (halaman == 2) {
    lcd.clearDisplay();
    lcd.setTextSize(2);
    lcd.setTextColor(WHITE);
    lcd.setCursor(25, 25);
    lcd.print("voltase");
  } else if (halaman == 3) {
    lcd.clearDisplay();
    lcd.setTextSize(2);
    lcd.setTextColor(WHITE);
    lcd.setCursor(10, 15);
    lcd.print("VOLTASE");
    lcd.setCursor(30, 35);
    lcd.print("VOLT");
  } else if (halaman == 4) {
    lcd.clearDisplay();
    lcd.setTextSize(2);
    lcd.setTextColor(WHITE);
    lcd.setCursor(25, 25);
    lcd.print("Arus bat");
  }

  ////isi halaman 5//////////
  if (halaman == 5) 
  {
   lcd.clearDisplay();
    lcd.setTextSize(1);
    lcd.setTextColor(WHITE);
    lcd.setCursor(30, 0);
    lcd.print("menu 2");

    if (menuItem == 5) {
      lcd.setCursor(5, 17);
      lcd.setTextColor(WHITE);
      lcd.print("> nilai torsi");
    } else {
      lcd.setCursor(5, 17);
      lcd.setTextColor(WHITE);
      lcd.print("  torsi sepeda ");
    }

    if (menuItem == 6) {
      lcd.setCursor(5, 27);
      lcd.setTextColor(WHITE);
      lcd.print("> cadance");
    } else {
      lcd.setCursor(5, 27);
      lcd.setTextColor(WHITE);
      lcd.print("  nilai cadance");
    }
  }
   else if (halaman == 6) {
    
    lcd.clearDisplay();
    lcd.setTextSize(1);
    lcd.setTextColor(WHITE);
    lcd.setCursor(25, 25);
    lcd.print("torsi sepeda");
  }
   else if (halaman == 7) {
    
    lcd.clearDisplay();
    lcd.setTextSize(1);
    lcd.setTextColor(WHITE);
    lcd.setCursor(25, 25);
    lcd.print("cadance ");
  }

  lcd.display();
}

because my code its very much...i make many tab program code...

what is "
Exception was unhandled".
massage mean?

Ah Adafrutiy and its libraries are prone to cause exception issues with the ESP32. With that OLED display I'd use the olikraus library, he actually develops on an ESP32 as part of his thing do.

An Unsigned long on a esp32 is 64 bits, You do not need a 64 bit number for millis() on an esp32.

Dude get a developer pinout and fix this mess:

No wonder you are getting WDT/Guru meditation errors.

DO NOT USE GPIO PINS 9,10,11, 6, 7, 8

And come to understand the pitfalls of using GPIO_NUM_13.

You see, your code posting has made a difference.

thanks it solve my problem