ESP 01 not programing after changing PIN 1 into output

Greetings,

I hope you are all doing well. Today I tried uploading my Arduino nano code into an ESP 01 just to see if I could use the ESP 01 alone without the nano. On the nano, I was using a servo and I had attached it to one of the digital pins. When I switched from the nano to the ESP, I attached the servo to PIN 1 and made the pin an output pin thinking that would mean GPIO 1 output. Obviously the servo did not work because PIN 1 on the ESP is actually the ground pin. Now I'm in a situation were I can no longer program the ESP and I do not know how to fix it. If any expert is able to help me out with this, that would be amazing. Thanks in advance.

What is pin 1 for you? D1? 1 as a number to identify the pin (identical to GPIO1)? Or pin 1 on the board (which is GND)?

Setting GPIO1 to output doesn't matter as it is the TX pin so this is usually an output.

1 Like

First of all, I have to mention that I have just started working with Arduino so you’ll have to bear with me here. I think it was pin 1 on the board which is GND. After I uploaded the code to the ESP 01, it became un-programmable. The red led on the ESP lights up normally but the blue led no longer lights up. Btw Initially I had attached the servo to pin 0 but I changed it to pin 1.

If I remember correctly the code went something like this:

#include <servo.h>
Servo servo;

Void setup() {
servo.attach (1);
}

Void loop() {

servo.write(60);
delay(1000);
servo.write(0);

}

I hope you’re able to understand this messy situation..

Above code doesn't compile, so I doubt it's the correct one.

Are we both talking about this board?

How are you trying to program the ESP? The ESP-01 doesn't have a USB connector.

The pin 1 in your code uses pin 2 (GPIO1).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.