swap (or change) uart pins on pyboard

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Batman
Posts: 10
Joined: Sun Aug 26, 2018 6:04 pm

swap (or change) uart pins on pyboard

Post by Batman » Wed Nov 04, 2020 3:29 pm

**I posted this before in the "general discussion" forum. I realized later that I should have posted this here. If there is a way of moving a thread to another part of the forum, I am happy to do so.**

Hi all

Is it possible to change or specify the pins used by the pyboard for RX and TX for a UART port? For example, x9 is used as tx and x10 as RX, per default for UART(1). But I'd like to swap this around.

It seems that the machine module in micropython might allow for this. But I could not get this to work on the pyboard 1.1. Perhaps, this is not possible on this particular board? In particular, the following code falis with the error "TypeError: extra keyword arguments given".

Code: Select all

uart = machine.UART(1,baudrate=9600)                         
uart.init(baudrate=9600, bits=8, parity=None, stop=1,tx=machine.Pin('X9'), rx=machine.Pin('X10'))
Best

User avatar
jimmo
Posts: 2059
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: swap (or change) uart pins on pyboard

Post by jimmo » Fri Nov 06, 2020 1:54 am

Batman wrote:
Wed Nov 04, 2020 3:29 pm
**I posted this before in the "general discussion" forum. I realized later that I should have posted this here. If there is a way of moving a thread to another part of the forum, I am happy to do so.**
I already replied to your original post - viewtopic.php?f=2&t=9256&p=52059#p52059

Post Reply