NavX API Serial Port issue

We are trying to connect our navX to a USB port, and it looks like the robotpy NavX API only supports create i2c and spi. We don’t see create serial or create USB.

It supports serial, just pass a wpilib.SerialPort.Port to the constructor. NavX API — robotpy-navx 2023.0.3 documentation

What is the equivalent command to create_i2c for serial in robotpy?

As they pointed out, it’s one of the constructors:

ahrs = navx.AHRS(wpilib.SerialPort.Port.kUSB)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.