Home/Support/Support Forum/"ImportError: cannot import name UART"
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

"ImportError: cannot import name UART"

0 votes
I am trying to send data via UART to the xbee 3 but my code returns this error message (title). This is the code i used:

from machine import UART #(<-the error is in this line)

uart = UART(1, 9600) # init with given baudrate
uart.init(9600, bits=8, parity=None, stop=1) # init with given parameters
asked 6 days ago in Python by Asimov1 New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
What product is this code running on?
answered 6 days ago by mvut Veteran of the Digi Community (13,036 points)
I'm using DigiMesh on the through hole version of the Digi XBee 3 Zigbee 3 RF Module (https://www.digi.com/products/embedded-systems/digi-xbee/rf-modules/2-4-ghz-rf-modules/xbee3-zigbee-3).
Every other library so far worked fine. It's just this library
If I recall, that function is not supported on that product.
oh, that's very unfortunate. Is there another way to use UART on this xbee?