Some good questions. This somewhat depends on how you plan on using the XRP. Assuming you plan to use it with the XRPCode in Blockly and MicroPython. The XRPLib uses the board assuming just one range finder and in the port marked Range. But, if you want to do some of your own programming to the ports, this is the complete hardware guide.
Just beware that some of the ports are used in multiple ways on the board. Some of those can be changed by cutting the marked connections on the back of the board. The encoders on the other motor ports are also good IO pins to use. Eager to hear what you end up doing. And let us know if you need any more information.
So I was thinking of a setup that had at least 3 rangefinders to navigate a “maze”.
I think this would just involve instead of using just the default rangefinder from defaults.py we would need to create at least 2 more that would specifically call out different IO pins.
Do you see any issue with doing this?
Can you describe what you mean by ports used in multiple ways?
This plan would work fine. For your situation, I’d recommend not using XRPLib/defaults.py, since that would unnecessarily also create the reflectance sensor on the same pins.
I believe Frank was specifically referencing the QWIK port on the board when he mentioned the pins being used in multiple ways. Those two pins are set up for I2C communication, which supports multiple devices (including the IMU, which uses those pins). I would be wary for using those pins for a rangefinder as a result, but the other three ports should be fine to use.
Hi there! Sounds like a fun project, would love to see what you make!
I agree with the comments above, namely avoid the Qwiic connector for non-I2C devices (unless you don’t use the IMU), and avoid the Extra connector (unless you’re willing to cut the jumpers and deal with no user button or battery voltage measurement).
Adding a second range sensor is easy enough if you connect it to the Line connector, but adding a third will likely require some more custom wiring. There’s a few options: use the GPIO pins from the servo headers (easiest), or take the GPIO pins from spare motor connectors (normally used for the encoders), or solder wires directly onto the pads of the Pico W (please read the documentation carefully before doing this!).
Another option is to use our Qwiic Ultrasonic Sensor, which provides an I2C interface to communicate, so you could connect this to the Qwiic connector. Note that we don’t currently have much software support for Qwiic devices in MicroPython, but we’re working on it! Expect the first version to be available in the software next feature update.