Communication ESP01
Posté : ven. 10 juin 2022 20:46
Bonjour,
je souhaiterai communiquer avec mon module ESP01 à travers la liaison série de mon Raspberry pi 3 modèle B. Dans la configuration de ce dernier, j'ai bien activé la liaison série (raspi-config)
Voici le branchement effectué :
ESP01 => Raspberry Pi
VCC (3.3V) => pin #1 (3.3V)
GND => pin #6 (GND)
TXD => pin #10 (RXD / BCM 15)
RXD => pin #8 (TXD / BCM 14)
CH_PD => pin #17 (3.3V)
RST => pin #3 (BCM 2)
GPIO 0 => pin #5 (BMC 5)
GPOI 2 => NC
Je démarre donc le module en mode "flash mode" avec ce programme :
#Demarre l'ESP en mode programmation
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD) # sets GPIO identification by physical pin numbers
resetPin = 3 # identify RPi physical pin connected to ESP8266 RST pin
flashPin = 5 # identify RPi physical pin connected to ESP8266 GPIO0 pin
GPIO.setup(resetPin, GPIO.OUT) # set reset pin as output
GPIO.setup(flashPin, GPIO.OUT) # set flash pin as output
GPIO.output(resetPin, GPIO.LOW) # drop voltage on RST pin
time.sleep(.2) # need for this waiting is speculative
GPIO.output(flashPin, GPIO.LOW) # drop voltage on GPIO0
time.sleep(.2) # need for this waiting is speculative
GPIO.output(resetPin, GPIO.HIGH) # start booting ESP8266
time.sleep(3) # wait for ESP8266 to boot
GPIO.output(flashPin, GPIO.HIGH) # restore voltage on
GPIO.cleanup() # reset pins on RPI to prevent future runtime warnings
J'utilise screen ("sudo screen /dev/serial0 115200") pour pouvoir communiquer avec mais rien ne se passe. Impossible d'envoyer de commande "AT".
Ce module m'a toujours résisté, j'avais essayé de communiquer avec en utilisant un arduino mais rien à faire je bloque toujours. Mon projet de domotique utilisant le wifi, je ne vois pas comment je peux m'en passer.
bon week end à vous,
Biovel
je souhaiterai communiquer avec mon module ESP01 à travers la liaison série de mon Raspberry pi 3 modèle B. Dans la configuration de ce dernier, j'ai bien activé la liaison série (raspi-config)
Voici le branchement effectué :
ESP01 => Raspberry Pi
VCC (3.3V) => pin #1 (3.3V)
GND => pin #6 (GND)
TXD => pin #10 (RXD / BCM 15)
RXD => pin #8 (TXD / BCM 14)
CH_PD => pin #17 (3.3V)
RST => pin #3 (BCM 2)
GPIO 0 => pin #5 (BMC 5)
GPOI 2 => NC
Je démarre donc le module en mode "flash mode" avec ce programme :
#Demarre l'ESP en mode programmation
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD) # sets GPIO identification by physical pin numbers
resetPin = 3 # identify RPi physical pin connected to ESP8266 RST pin
flashPin = 5 # identify RPi physical pin connected to ESP8266 GPIO0 pin
GPIO.setup(resetPin, GPIO.OUT) # set reset pin as output
GPIO.setup(flashPin, GPIO.OUT) # set flash pin as output
GPIO.output(resetPin, GPIO.LOW) # drop voltage on RST pin
time.sleep(.2) # need for this waiting is speculative
GPIO.output(flashPin, GPIO.LOW) # drop voltage on GPIO0
time.sleep(.2) # need for this waiting is speculative
GPIO.output(resetPin, GPIO.HIGH) # start booting ESP8266
time.sleep(3) # wait for ESP8266 to boot
GPIO.output(flashPin, GPIO.HIGH) # restore voltage on
GPIO.cleanup() # reset pins on RPI to prevent future runtime warnings
J'utilise screen ("sudo screen /dev/serial0 115200") pour pouvoir communiquer avec mais rien ne se passe. Impossible d'envoyer de commande "AT".
Ce module m'a toujours résisté, j'avais essayé de communiquer avec en utilisant un arduino mais rien à faire je bloque toujours. Mon projet de domotique utilisant le wifi, je ne vois pas comment je peux m'en passer.
bon week end à vous,
Biovel