I have the following simple example which compiles but does not run on ESP32 using Arduino IDE 2.02-nightly.
Any ideas how to fix?
// Sensor Class *****************
#include <OneWire.h>
#include <DallasTemperature.h>
// .. Class Definition
class sensors {
public:
sensors();
OneWire myOneWire;
DallasTemperature ds;
};
// .. Constructor
sensors::sensors() : myOneWire(10), ds(&myOneWire) {}
// Main Code
sensors mySensors;
void setup() {
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(millis());
delay(100);
}
The ESP serial console gives the following and continuously restarts itself.
12:06:09.193 ->
12:06:09.193 -> rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
12:06:09.225 -> configsip: 0, SPIWP:0xee
12:06:09.225 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
12:06:09.225 -> mode:DIO, clock div:1
12:06:09.225 -> load:0x3fff0030,len:1344
12:06:09.225 -> load:0x40078000,len:13864
12:06:09.225 -> load:0x40080400,len:3608
12:06:09.225 -> entry 0x400805f0
12:06:17.985 -> ets Jul 29 2019 12:21:46
12:06:17.985 ->
12:06:17.985 -> rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
12:06:17.985 -> configsip: 0, SPIWP:0xee
12:06:17.985 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
12:06:17.985 -> mode:DIO, clock div:1
12:06:17.985 -> load:0x3fff0030,len:1344
12:06:17.985 -> load:0x40078000,len:13864
12:06:17.985 -> load:0x40080400,len:3608
12:06:17.985 -> entry 0x400805f0
12:06:26.745 -> ets Jul 29 2019 12:21:46