int sensor_pin = 0;
int output_value ;
void setup() {
Serial.begin(115200);
Serial.println("Reading From the Sensor ...");
delay(2000);
}
void loop() {
output_value= analogRead(sensor_pin);
output_value = map(output_value,550,0,0,100);
Serial.print("Moisture : ");
Serial.print(output_value);
Serial.println("%");
delay(1000);
}
I have tested in a way to check that the problem is my 3.3v or 5v.
My test was that I had unwired everything, then I wired my signal pin (A0). Nothing happened. Then I wired my GND pin. Nothing happened. After that, I wired my 5v. Now I got a message saying about the Flash Board on the serial monitor. Finally, I tested my 3.3v and the same message popped up.
Sorry, I was in a tight situation.
Now I will provide you with the exact information:
I use an ESP32 (not Nano). My Arduino IDE is version 1.8.19 (note that I have tested the latest).
This is a picture directly from my serial monitor
I moved your topic to a more appropriate forum category @gunduzthepro.
The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.
In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.
This indicates there is some problem with the data in the flash memory on the ESP32 board.
Does the problem still occur if you disconnect all external circuitry from the ESP32 board (including the sensor) and use the board with only the USB connection to your computer?
Of course the sensor readings reported by the sketch will be nonsensical without the sensor connected, but the goal of the experiment is to check whether the reset loop is being caused by some interference from the external circuitry.