Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

getting UART working on Feather M) Logger
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

getting UART working on Feather M) Logger

by narrab on Mon Aug 21, 2017 12:29 pm

I dont seem to be able to get the UART working on the Feather M0 logger circuit python.

From busio import UART
uart = UART(0,1, 9600)

This gives the error "extra positional arguments given"

What am I doing wrong?

narrab
 
Posts: 15
Joined: Tue Oct 09, 2012 11:09 am

Re: getting UART working on Feather M) Logger

by jerryn on Mon Aug 21, 2017 12:42 pm

I think you have to specify the baudrate=9600 with the keyword.
Also the tx.rx should be Pin Identifiers. (like TX, RX )

http://circuitpython.readthedocs.io/en/stable/shared-bindings/busio/UART.html
try
Code: Select all | TOGGLE FULL SIZE
from board import *
from busio import UART
uart=UART(TX,RX,baudrate=9600)

that works for me on a Metro_M0_Express

jerryn
 
Posts: 1328
Joined: Sat Sep 14, 2013 9:05 am

Re: getting UART working on Feather M) Logger

by narrab on Mon Aug 21, 2017 3:28 pm

Thank you for the help

I had tried that before posting and it had not worked as it would not accept the TX and RX. Giving the following error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'TX' is not defined

The part that I was missing was the from Import board * that defines the pin names. So thank you again.

narrab
 
Posts: 15
Joined: Tue Oct 09, 2012 11:09 am

Re: getting UART working on Feather M) Logger

by jerryn on Mon Aug 21, 2017 4:02 pm

Great! Glad it is working for you! Good luck!

jerryn
 
Posts: 1328
Joined: Sat Sep 14, 2013 9:05 am

Please be positive and constructive with your questions and comments.