ESP13 Shield []

Outils pour utilisateurs

Outils du site


ESP13 Shield

Ceci est une ancienne révision du document !


ESP13 Shield

Description

source : https://www.instructables.com/id/ESP8266-ESP-12E-UART-Wireless-WIFI-Shield-TTL-Conv/

  • A (DIGITAL PINS): sequence of pins used by the Arduino.
  • B (ESP8266 PINS): ESP8266-12E and their respective pins. On the back of the plate there is the nomenclature of the pins.
  • C (EXTERNAL SERIAL USB ADAPTER CONNECTION): Pin sequence used to connect the external Serial USB adapter for firmware update or debugging of the ESP8266.
  • D (SHIELD MAINTENANCE PINS): A three-pin sequence identified as Maintenance Only and used to verify that the voltage regulator is receiving and supplying the voltages correctly. IT SHOULD NOT BE USED AS A SUPPLY SOURCE.
  • E (DIP SWITCH TO MODIFY OPERATING MODES): Four-way DIP switch to change operating modes.
    • CONTACT 1 (P1) and CONTACT 2 (P2): used to connect the RX (represented by P1) and TX (represented by P2) of the ESP8266 to the Arduino D0 (RX) and D1 (TX) pins. P1 and P2 in OFF position disable the RX connection from ESP8266 to Arduino TX and TX from ESP8266 to Arduino RX.
    • CONTACT 3 (P3) and CONTACT 4 (P4): used to enable and disable the firmware upgrade mode for ESP8266. To enable firmware write / load on ESP8266, P3 and P4 must be in the ON position. When P4 is in the ON position, the DFU LED will light, indicating that the ESP8266 is enabled to receive the firmware. To disable the firmware update mode and set the ESP8266 to normal operation, simply set P3 and P4 to OFF.
    • NOTE: All 4 contacts in the OFF position indicate that the ESP8266 is operating in normal mode next to the Arduino.

  • F (AD8 FROM ESP8266): pin assignment for the ESP8266 ADC. A pin operating in the range of 0 to 1V and another pin operating in the range of 0 to 3.3V. These pins will only be used when using ESP8266 alone (standalone mode).
  • G (ESP8266 RESET): button used to reset ESP8266. Whenever you change the position of the DIP switches, you must press the ESP-RST button.
  • H (ANALOG PIN AND POWER SUPPLY): sequence of pins used by the Arduino.

Programming

Wiring the ESP8266

Code to flash

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
const char* ssid     = "YOUR_SSID";
const char* password = "YOUR_PASS";
ESP8266WebServer server(80); // HTTP server on port 80
void setup() {
 Serial.begin(115200);    
 WiFi.disconnect(); // Disconnect AP
 WiFi.mode(WIFI_STA);  
 WiFi.begin(ssid, password); // Connect to WIFI network
// Wait for connection
 while (WiFi.status() != WL_CONNECTED) {
  delay(500);
  Serial.println(".");
 }
 Serial.print("Connected to ");
 Serial.println(ssid);
 Serial.print("IP address: ");
 Serial.println(WiFi.localIP());
server.on("/", [](){
  server.send(200, "text/plain", "Hello World");
 });
server.begin(); // Start HTTP server
 Serial.println("HTTP server started.");
}
void loop() {
 server.handleClient();
}
documentation/microcontroleurs/arduino/modules/network_shields/arduino_esp13_shield/index.1585963298.txt.gz · Dernière modification : de f1sls