Oliver M 06/20/2024 05:22 PMI'm trying to connect to an ublox neo-6m via uart; I've soldered the wires from pins 20 and 21 of my ESP32 C3 to the RX and TX terminals on the gps board (crossed, so RX -> TX and TX -> RX). When I try to run a minimal program, it bails out with an "already in use exception". How can I find out what's going wrong?
Program:
import gpio
import uart
import ublox-gnss
RX ::= 20
TX ::= 21
main:
port := uart.Port
--rx=gpio.Pin RX // <--- this is line 10
--tx=gpio.Pin TX
--baud-rate=9600
task::
reader := port.in
while line := reader.read-line:
print "Received: $line"
Error:
******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.158>
******************************************************************************
EXCEPTION error.
ALREADY_IN_USE
0: gpio-use_ <sdk>/gpio/pin.toit:394:3
1: Pin <sdk>/gpio/pin.toit:131:17
2: main gps.toit:10:10
******************************************************************************
[jaguar] ERROR: program 112446b3-9c37-933d-895c-0408ccd4026d stopped - exit code 1