Hello,
I've read on this forum that people have had the same problem I am facing now. I followed the proposed solutions and still did not entirely fix my issue. I have already set the Partition Scheme to "HUGE APP (3 MB NO OTA/1MB SPIFFS" as well as lowered the upload speed. This is my first time using an esp32 and my first time using this forum so please have some grace, the program is a simple LED and pushbutton circuit, I appreciate everyone's help greatly. The code and output are as follows:
| CODE
int ledpin= 23;
int buttonpin=15;
int buttonread;
int ledstate=0;
int buttonnew;
int buttonold=1;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(ledpin, OUTPUT);
pinMode(buttonpin, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
buttonnew=digitalRead(buttonpin);
buttonread=digitalRead(buttonpin);
Serial.println(buttonread); // prints 1's when not pressed and 0's when is
if (buttonold == 0 && buttonnew==1) {
if (ledstate == 0) {
digitalWrite(ledpin, HIGH);
ledstate=1;
} else {
digitalWrite(ledpin, LOW);
ledstate=0;
}
}
buttonold=buttonnew;
}
| OUTPUT
Sketch uses 281393 bytes (8%) of program storage space. Maximum is 3145728 bytes.
Global variables use 20232 bytes (6%) of dynamic memory, leaving 307448 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port COM3
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:d8:d5:96:28:d8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 512000
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00054fff...
Compressed 19744 bytes to 13604...
Writing at 0x00001000... (100 %)
Wrote 19744 bytes (13604 compressed) at 0x00001000 in 0.5 seconds (effective 311.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 137...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (137 compressed) at 0x00008000 in 0.1 seconds (effective 414.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 643.9 kbit/s)...
Hash of data verified.
Compressed 281760 bytes to 157793...
Writing at 0x00010000... (10 %)
Writing at 0x0001bc81... (20 %)
Writing at 0x0002432c... (30 %)
Writing at 0x000298cb... (40 %)
Writing at 0x0002ebc6... (50 %)
Writing at 0x00033f38... (60 %)
Writing at 0x0003cb23... (70 %)
Writing at 0x00046199... (80 %)
Writing at 0x0004be9f... (90 %)
Writing at 0x000513ca... (100 %)
Wrote 281760 bytes (157793 compressed) at 0x00010000 in 3.4 seconds (effective 661.5 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...