Alas…
I have tried to use the I2C interface… the first hurdle with this is that this Lora board does not implement the pull up resistors. Using a raspberry pi breakout board, I installed the resistors, defined the I2C interface in circuitpython, and did a scan. No devices. So it appears that I2C is not there yet, and really is only a future idea. That’s unfortunate, because doing that in circuitpython would be easy. So the future version with I2C actually implemented sounds like will be well received, but is not real yet. With no pullups installed, that means even new firmware for this board cannot use this interface… without some kind of a workaround.
Meanwhile… from research and help from others, the existing pins D2 and D3, while easy to use a software UART from the Arduino perspective, are not easy to use from Circuitpython. If only the hardware designers had selected two pins that an also map to a uart on this chip… then it would be easy.
It seems very odd to actually rely on a software serial implementation when you step back and look at the virtual field of serial options on this host processor…
So… I physically connected D3 to to A1, and D2 to A0 on the 40 pin connector.
I then set D2 and D3 on the Wio Terminal side to inputs, to ensure there would be no conflicts:
led2 = digitalio.DigitalInOut(board.D3)
led2.direction = digitalio.Direction.INPUT
led1 = digitalio.DigitalInOut(board.D2)
led1.direction = digitalio.Direction.INPUT
I then defined the UART on the Wio Terminal side using A0 and A1.
The same data will go to D2 and D3, but I can’t see it there as a uart.
I can see it at A0 and A1.
uart = busio.UART(board.A0, board.A1, baudrate=9600)
time.sleep(.5)
print(uart.readline())
time.sleep(.5)
print(uart.readline())
time.sleep(.5)
print(uart.readline())
time.sleep(.5)
print(uart.readline())
And… bingo! I get GPS output from my newly defined UART.
I just had to bring it to a set of pins that the hardware can define as a serial device that is supported.
Someone within Seeed really should devote some time to supporting CircuitPython from within the community. I feel like this is very much a growth area for Seed that they are missing out on.
I’m sure it all looks easy from an Arduino perspective once you have done everything a few times… but approaching this platform from a Circuitpython perspective brings such a rich set of tools and rapid development that from my view… it’s just hard to ignore.