RVR Command Codes

I’m exploring using a Raspberry Pi on an RVR to teach assembly language programming. After just a short review of the SDK and docs, I assume that the RVR interface is command codes through the RPi serial port/GPIO pins.

Is there a list of command codes somewhere? I saw some Sphero codes in GitHub sources, but a complete list and/or docs would be great. I want to write some libraries or macros that my students can use via ARM assembler on the Pi.

Thanks.

3 Likes

Hi @frethop, welcome to our forums!

That sounds like a great class, and it’s exciting to hear about it! We are working on comprehensive public protocol level documentation (packet structure on the byte level), as well as detailed documentation of all of our commands. Until then I’d recommend working with our existing public SDKs, documented here: https://sdk.sphero.com/. When I hear about a more specific timeline for protocol documentation I’ll post back here.

4 Likes

An easier method might be to have the assembly code call a C function. Will the C/C++ SDK be released for the Raspberry Pi? I see it’s out for the micro:bit, but the code that implements the C library is not posted to Github.

Thanks.

We are looking at options for open sourcing the API-related C code, but that’s a maybe at this point. If it happens, it will most likely be after the release of the documentation.

If you poke around in the Raspberry Pi Python SDK, you can find all the code for constructing packets and port it to your language of choice to get something going ahead of the docs. This file in particular should be a good starting point:

https://github.com/sphero-inc/sphero-sdk-raspberrypi-python/blob/master/sphero_sdk/common/protocol/api_sphero_message.py

-Jim

1 Like

Very nice. I’ll check it out.

BTW, it’d be nice if you just recompiled the micro:bit C library for the Pi. I assume the calls would be close to the same and the interface IS the same…