UART communication in ESP-12E

991 Views Asked by At

I am using micro python in same board to start a serial communication

from machine import UART
uart = UART(1, 9600)                         
uart.init(9600, bits=8, parity=None, stop=1) 
uart.write('abc')

and reading serial data using usb to serial converter which i plugged on pin 21 and 22. But that is not printing anything i checked with the help of termite.

and also uart.write('abc') prints 3 in python REPL.

Please point out my mistake.is it possible to read serial data using serial converter or not?

PS:I have read many forums but not found anything useful. TIA

1

There are 1 best solutions below

0
On

Unfortunately, I've never used esp-12E yet but referring to its document here I can see that UART1 has only TX, unlike UART0 (which has both TX and RX). After some search, I found out that RX of UART1 is used to connect the flash chip, that's why UART1 is TX only, unlike UART0. So editing your code to UART(0,9600) Should fix the error, hopefully.