using a ESP8266-12
vcc connected to 3V3 external source
gnd to gnd
rst > connected to 3V3
enable > connected to 3V3 by a 1K resistor
gpio_0 when programming with jumper to gnd, otherwise with resistor 10K to 3V3
gpio_15 by 1K resistor to gnd
tx / rx/ gnd connected to usb converter to pc cp210X
this gives you some idea how its connected
I upload the code to the esp8266, upload done. usb converter still connected... and bootload jumper to gnd too > program runs on esp8266
when i disconnect the usb converter > still works
when i disconnect the usb converter and after that cycle external powersupply... esp8266 doesn't start up its program, with or without removing bootloader jumper!!
What is wrong here, is it a hardware or a software problem?
this is my program in arduino 1.6.13
code below:
/////////////////////////////////////////////////////////////////////////////////////////////
/*********
-- Setup dedtails programming
NodeMCU 1.0 = Board
cpu = 80mhz
flash = 1M
speed = 115200
Port = COM1
pin 4 = outpuut relay
pin 2 = output LED
*********/
#include <ESP8266WiFi.h>
WiFiServer server(80); //Initialize the server on Port 80
// WiFi parameters to be configured from Home router
const char* ssid = "SSID NAME"; //
const char* password = "PASSWORD SSID"; //
// NETWORK: Static IP details...
IPAddress ip(192, 168, 1, 99);
IPAddress gateway(192, 168, 1, 254);
IPAddress subnet(255, 255, 255, 0);
int power_led = 2;
int relay = 4;
void setup() {
// initialize GPIO 2 & 4 as an OUTPUT.
pinMode(power_led, OUTPUT);
pinMode(relay, OUTPUT);
// Wifi connected to Home Router
Serial.begin(9600);
// Static IP Setup Info Here...
WiFi.config(ip, gateway, subnet);
//WiFi.softAPdisconnect(true);
WiFi.mode(WIFI_STA);
// Connect to WiFi
WiFi.begin(ssid, password);
// while wifi not connected yet, print '.'
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
// Print SSID and IP-Address
Serial.println("");
Serial.print("Connected to WiFi: ");
Serial.println(ssid);
Serial.print("Server IP is: ");
Serial.println(WiFi.localIP());
digitalWrite(power_led, LOW);
delay(500);
digitalWrite(power_led, HIGH);
delay(500);
digitalWrite(power_led, LOW);
delay(500);
digitalWrite(power_led, HIGH);
delay(500);
server.begin(); // Start the HTTP Server
delay(5000);
digitalWrite(power_led, LOW);
}
void loop() {
WiFiClient client = server.available(); // Router Mode
if (!client) {
return;
}
//Read what the browser has sent into a String class and print the request to the monitor
String request = client.readStringUntil('\r');
//Looking under the hood
Serial.println(request);
// Turn ON/OFF a Relay by a GET command
if (request.indexOf("/OFF") != -1) {
digitalWrite(relay, LOW);
}
else if (request.indexOf("/ON") != -1) {
// else if (request.indexOf("/?FLUSH") != -1) { /////////
digitalWrite(relay, HIGH);
}
}