RVR and Raspberry Pi Zero W

Hi,

It is recomended that Raspberry Pi is connected to the RVR via the UART +5V line

But how about the Zero W which had a middle charing + data USB port?

Can the Zero W be connected only via the USB to RVR? And still have data acceess to it? B)

Thanks,

2 Likes

You would connect the RVR to the UART GPIO pins on the RPi Zero W. The USB would be to just power the Pi Zero. Works well as I had this config until I upgraded to RPi 4 since need more processing power.

1 Like

I’ve asked a similar question for the regular Pi. Extra hardware will be needed, but I’m still hoping it’s possible to only have to plug in a single cable like you can for Arduino:

If the Pi Zero W already has data & power over it’s USB and we can figure out how to use that, even better! I hope your question gets answered!

1 Like

a temporary solution (but not for Zero W) would be https://shop.pimoroni.com/products/usb-to-uart-serial-console-cable :sunglasses:

for Zero W you’d need an additional shim https://shop.pimoroni.com/products/usb-to-microusb-otg-converter-shim

1 Like

erm, you’d need the converter shim for all RPi’s :shushing_face:

1 Like

also I have not tested this hack.

please use caution when playing with electricity :innocent:

1 Like

FYI you can edit posts instead of making a bunch of short ones.

I cannot edit the posts in Safari once I reply / send them

the only option I see are heart, link, flag, delete, reply :face_with_hand_over_mouth:

ah, there is an edit indeed that might disappear over time, not shown for the posts above.

1 Like

That sounds right. Since I got the Regular rank I can edit my post indefinitely.

I don’t have one to test, but it looks like the answer is yes!

You can configure your Pi Zero as a USB CDC Serial gadget (same standard as Arduino Uno, which RVR officially supports) and it looks like it can be powered by that same port (even though it has a separate dedicated power port).

You’ll just have to make sure the RVR SDKs/APIs use the correct COM port (not sure which it would be) instead of the default (/dev/ttyS0). For the nodejs API, just set the SERIAL_PORT_PATH environment variable.

For the python API, set the port_id parameter of SerialObserverDal

rvr = SpheroRvrObserver(
    dal = SerialObserverDal(
        port_id="<CDC port>"
    )
)

or SerialAsyncDal

rvr = SpheroRvrAsync(
    dal = SerialAsyncDal(
        loop,
        port_id="<CDC port>"
    )
)

Let us know if it works!

1 Like

I went ahead and bought myself a Pi 4, which supports g_serial, but so far haven’t gotten it to work with RVR. My attempts so far: UART over USB for Raspberry Pi

SPHERO Email Marketing -