I'm trying to create an UART connection between a Nano and an NodeMCU, running MicroPython.
Code for trying is meaningless - Arduino says "HI", and ESP8266 should receive and print msg value.
Connections :
Nano Rx --> ESP Tx
Nano Tx --> ESP Rx
Nano USB --> Mac running repl
ESP USB --> Linux running Arduino IDE
BUT- when I physically connect as described the ESP BOARD freezes, in a way I can't even connect it using repl
. Only after disconnecting wires (not only powering off the Nano), ESP unfreezes.
Appreciate any help.
-
io 1 of esp8266 is RX, io 3 is TX. clear the wiring descriptionJuraj– Juraj ♦2018年10月23日 19:11:59 +00:00Commented Oct 23, 2018 at 19:11
-
do you connect ground? which esp module you have?Juraj– Juraj ♦2018年10月23日 19:13:25 +00:00Commented Oct 23, 2018 at 19:13
-
hi @Juraj - Tx on Nano connects to Rx on ESP, and RX on Nano, connects to Tx on ESPguyd– guyd2018年10月23日 19:15:24 +00:00Commented Oct 23, 2018 at 19:15
-
@Juraj no ground is connected. should it ????. connected to a NodeMCUguyd– guyd2018年10月23日 19:16:17 +00:00Commented Oct 23, 2018 at 19:16
-
@Juraj - please explain what to clarifyguyd– guyd2018年10月23日 19:19:21 +00:00Commented Oct 23, 2018 at 19:19
1 Answer 1
You can't connect the same Serial to a computer over USB and to a Nano at the same time. Not only because the Nano is on 5 V which disturbs the 3.3 V side of the USB converter.
Disconnect the NodeMCU from computer, try to power it from Nano's 3.3 V pin (not for WiFI) and don't forget to connect ground between the MCUs.
Nano has one Serial, which is connected over USB to computer too. So there too you can't use the USB and RX TX pins at the same time. You could use SoftwareSerial to connect to NodeMCU.
The Nano TX to esp8266 RX should have logic level conversion to not to send 5V to esp8266 3.3V pin.