UART over Pyscan pins
-
Hi everyone.
I'd like to know whether I can use existing pins on the pyscan board to communicate with another device via UART. Can't find anything on the matter. I would for example like to use the fingerprint reader's RX/TX pins as my UART pins. Currently using it with a SiPy, if that helps.
Any help is appreciated. Thanks, Louis
-
@Louis-Henn You cannot share UART TX signals, because they are driven actively both high and low. But you can use the pins on the extension connector of Pyscan for UART. See: https://docs.pycom.io/gitbook/assets/pyscan-pinout.pdf. Using P15 and P19 for UART looks fine, as long as the fingerprint reader is not connected. Just give it a try.
-
@robert-hh thank you. I guess my next question is how would I program UART to work over this pins. Up to know I've used pins 10 and 11 when using pymakr expansion board. How would I code it to be P15/P19. Is it just conncted to GPIO 15/19? Edit: I just saw there is no GPIO 19
-
@Louis-Henn Look at the documentation: https://docs.pycom.io/firmwareapi/pycom/machine/uart/
e.g.from machine import UART uart = UART(1, baudrate=9600, pins=('P19', 'P15'))or uart 1. Note, that using uart.init() requires specifying all setting again, so it is more convenient to put all setting in the uart instantiation call.
-
@robert-hh took some debugging, but I did manage to make it work like you said. Thanks a lot!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login