I’ve been successful at getting some commands to run on a number of CircuitPython boards. A big thanks to @rmerriam for his C++ API and to Matthias Kreier, a colleague at my school, for helping with testing on the boards.
Here is a link to the repository containing the code I’ve adapted from the micro:bit implementation:
My annotated library of functions is contained within the sphero_rvr.py file in the repository. The major success of the last week was getting the locator and yaw sensor to report coordinates and heading.
- Here is a video of a proportional control system using the y coordinate of the RVR.
- This video shows the RVR using an ultrasonic sensor connected to an Adafruit Metro M0 express
My students are working on a challenge this week to get the RVR to navigate around a VEX field and show what they have learned about control systems and using libraries and APIs. I’ll share some of their work when they finish the project.
One thing I’d love to do is use the CDC functions here in Circuitpython to connect to the RVR:
https://circuitpython.readthedocs.io/en/latest/shared-bindings/usb_cdc/index.html
I know the micro:bit has the DAPLink that sets up the CDC communication with the RVR so that its UART works over USB without any extra work. This doesn’t seem to be the case.
Does anyone have insights on how the RVR presents itself as a CDC host? Does it need to do any sort of handshake protocol to set up a connection? I have tried a few different configurations of the usb_cdc in CircuitPython to use both the console and the data ports, but neither seems to be connecting to the RVR by just plugging it in like the micro:bit. I have tried turning off the USB drive as well and no connection occurs.