micropython-esp32 icon indicating copy to clipboard operation
micropython-esp32 copied to clipboard

Make UART allow Pin

Open MATTYGILO opened this issue 3 years ago • 2 comments

It would be great if UART accepted Pin class instead of integers

>>> UART(1, 9600, timeout=1000, rx=Pin(18), tx=Pin(17))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can't convert Pin to int

MATTYGILO avatar Nov 18 '22 13:11 MATTYGILO

The micropython reads and also combines concept from C programming 2 python allocation of memory and registers in C using hexadecimal combined with variables R known stratgy for hardware programming so if u can use this techniques for programming ur module with less lines of conjugation of line of array so that u can locate UART registers for managing UART port Also python hv options for this i think

On Fri, Nov 18, 2022, 4:04 PM MATTYGILO @.***> wrote:

It would be great if UART accepted Pin class instead of integers

UART(1, 9600, timeout=1000, rx=Pin(18), tx=Pin(17)) Traceback (most recent call last): File "", line 1, in TypeError: can't convert Pin to int

— Reply to this email directly, view it on GitHub https://github.com/micropython/micropython-esp32/issues/266, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZTRFYHUYYXQYU5UNL72MTWI55GDANCNFSM6AAAAAASEPCHXA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

BEMNETADEFIS avatar Nov 19 '22 23:11 BEMNETADEFIS

I kind of agree with you there @MATTYGILO but please note this repository is no longer active, the ESP32 port has been merged into the main Micropython repo at https://github.com/micropython/micropython

nickzoic avatar Nov 21 '22 01:11 nickzoic