• Система автоматизации с открытым исходным кодом на базе esp8266/esp32 микроконтроллеров и приложения IoT Manager. Наша группа в Telegram

ESP-12E помер?

adel78

New member
Имею ESP-12E
подключение через Arduino Uno + Блок питания отдельный
VCC - к платке AMS1117-3.3
GND - к блоку и к Uno (Общий)
RST, CH_PD через резистор 10k к VCC (+3.3V)
GPIO15 через 10k к GND
GPIO0 через 10k к +3,3V и через кнопку к GND

подключил, все хорошо, на АТ отвечал, точка создалась, все было замечательно
перевел в режим прошивки, начал заливать скетч
Код:
#include <Adafruit_Sensor.h>

#include <DHT.h>
#include <DHT_U.h>

/*********
  Rui Santos
  Complete project details at http://randomnerdtutorials.com
*********/

// Including the ESP8266 WiFi library
#include <ESP8266WiFi.h>
//#include "DHT.h"


// Uncomment one of the lines below for whatever DHT sensor type you're using!
#define DHTTYPE DHT11   // DHT 11
//#define DHTTYPE DHT21   // DHT 21 (AM2301)
//#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321

// Replace with your network details
const char* ssid = "Name";
const char* password = "password";

// Web Server on port 80
WiFiServer server(80);

// DHT Sensor
const int DHTPin = 5;
// Initialize DHT sensor.
DHT dht(DHTPin, DHTTYPE);

// Temporary variables
static char celsiusTemp[7];
static char fahrenheitTemp[7];
static char humidityTemp[7];

// only runs once on boot
void setup() {
  // Initializing serial port for debugging purposes
  Serial.begin(115200);
  delay(10);

  dht.begin();
 
  // Connecting to WiFi network
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
 
  WiFi.begin(ssid, password);
 
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");
 
  // Starting the web server
  server.begin();
  Serial.println("Web server running. Waiting for the ESP IP...");
  delay(10000);
 
  // Printing the ESP IP address
  Serial.println(WiFi.localIP());
}

// runs over and over again
void loop() {
  // Listenning for new clients
  WiFiClient client = server.available();
 
  if (client) {
    Serial.println("New client");
    // bolean to locate when the http request ends
    boolean blank_line = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
     
        if (c == '\n' && blank_line) {
            // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
            float h = dht.readHumidity();
            // Read temperature as Celsius (the default)
            float t = dht.readTemperature();
            // Read temperature as Fahrenheit (isFahrenheit = true)
            float f = dht.readTemperature(true);
            // Check if any reads failed and exit early (to try again).
            if (isnan(h) || isnan(t) || isnan(f)) {
              Serial.println("Failed to read from DHT sensor!");
              strcpy(celsiusTemp,"Failed");
              strcpy(fahrenheitTemp, "Failed");
              strcpy(humidityTemp, "Failed");      
            }
            else{
              // Computes temperature values in Celsius + Fahrenheit and Humidity
              float hic = dht.computeHeatIndex(t, h, false);    
              dtostrf(hic, 6, 2, celsiusTemp);          
              float hif = dht.computeHeatIndex(f, h);
              dtostrf(hif, 6, 2, fahrenheitTemp);      
              dtostrf(h, 6, 2, humidityTemp);
              // You can delete the following Serial.print's, it's just for debugging purposes
              Serial.print("Humidity: ");
              Serial.print(h);
              Serial.print(" %\t Temperature: ");
              Serial.print(t);
              Serial.print(" *C ");
              Serial.print(f);
              Serial.print(" *F\t Heat index: ");
              Serial.print(hic);
              Serial.print(" *C ");
              Serial.print(hif);
              Serial.print(" *F");
              Serial.print("Humidity: ");
              Serial.print(h);
              Serial.print(" %\t Temperature: ");
              Serial.print(t);
              Serial.print(" *C ");
              Serial.print(f);
              Serial.print(" *F\t Heat index: ");
              Serial.print(hic);
              Serial.print(" *C ");
              Serial.print(hif);
              Serial.println(" *F");
            }
            client.println("HTTP/1.1 200 OK");
            client.println("Content-Type: text/html");
            client.println("Connection: close");
            client.println();
            // your actual web page that displays temperature and humidity
            client.println("<!DOCTYPE HTML>");
            client.println("<html>");
            client.println("<head></head><body><h1>ESP8266 - Temperature and Humidity</h1><h3>Temperature in Celsius: ");
            client.println(celsiusTemp);
            client.println("*C</h3><h3>Temperature in Fahrenheit: ");
            client.println(fahrenheitTemp);
            client.println("*F</h3><h3>Humidity: ");
            client.println(humidityTemp);
            client.println("%</h3><h3>");
            client.println("</body></html>");  
            break;
        }
        if (c == '\n') {
          // when starts reading a new line
          blank_line = true;
        }
        else if (c != '\r') {
          // when finds a character on the current line
          blank_line = false;
        }
      }
    }
    // closing the client connection
    delay(1);
    client.stop();
    Serial.println("Client disconnected.");
  }
}


после чего модуль в терминале начал выдавать постоянно

ets Jan 8 2013,rst cause:2, boot mode:(2,7)

epc1=0x40100000, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000 Fatal exception (0):

почитал форум, подтянул еще раз массу к GPIO0 и перезагрузил его
теперь в терминале стало выдавать

ets Jan 8 2013,rst cause:2, boot mode:(7,7)

waiting for host
если просто перезагружаю через RST+GND то начинает сыпаться верхняя цитата, если подтягиваю к GPIO0 "землю" то в выходит вторая цитата

при этом ни в одном из случаев я не вижу его в сети или даже попыток подключения

в какую сторону вообще смотреть?

p.s.:
 
Последнее редактирование:

adel78

New member
кстати, пытался подключиться через XTCOM_UTILITY, не получается, выдает ошибку:
upload_2017-5-1_16-28-26.png
 

adel78

New member
при исключении подтяжке на прямую к RST +3.3V - выдало следующее
ets Jan 8 2013,rst cause:2, boot mode:(3,0)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v00000000
~ld
⸮⸮VQ⸮⸮V1CLD;⸮P⸮D⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮@V[,܅⸮P7⸮⸮Z5⸮K⸮7⸮⸮⸮RY%i1S#@HX⸮D`eC


полное переподключение по схеме заново
https://reefcentral.ru/forum/uploads/monthly_04_2016/post-74-0-21532000-1460362386.png
подключение к блоку питание через AMS1117-3.3


ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v00000000
~ld
 

adel78

New member
в общем победил сам себя
как обычно, оказалось у ЕСП капризные контакты
надо было подтянуть GPIO_15 к земле без резистора
а к GPIO_2 подтянуть +3,3V через резистор

запустилось все и пошло сразу
теперь найти бы этот pin5 на плате
 
Сверху Снизу