sphero-inc / sphero-sdk-raspberrypi-python

Sphero RVR SDK to run on Raspberry Pi using Python
Other
78 stars 52 forks source link

RVR does not communicate #19

Open fwuffyboi opened 2 years ago

fwuffyboi commented 2 years ago

When I install the dependencies and I run any example script the RVR doesn't not complete the action I wanted it to. The wires are connected correctly and the script does not return any errors. I am using python 3.9 and a raspi 3B+

Jim-Konish commented 2 years ago

Please make sure you connect your RVR to the Sphero EDU app on Android or iOS to ensure it has the latest firmware. The original factory firmware was not feature complete, and had UART and USB functionality disabled in order to prevent use without an update.

fwuffyboi commented 2 years ago

thanks @Jim-Konish Do i just connect it and will it tell me to update or will there be a button somewhere in the menu?

Jim-Konish commented 2 years ago

@fluffyWuffy if it needs an update it'll happen automatically after you connect.

On Fri, Dec 31, 2021, 11:43 AM fluffyWuffy @.***> wrote:

thanks @Jim-Konish https://github.com/Jim-Konish Do i just connect it and will it tell me or will there be a button somewhere in the menu?

— Reply to this email directly, view it on GitHub https://github.com/sphero-inc/sphero-sdk-raspberrypi-python/issues/19#issuecomment-1003415464, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNWZ3447FKDMQKAFF4GHGLUTXMUJANCNFSM5LAH7V5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

fwuffyboi commented 2 years ago

i connected it to the rvr and no update happened, it works fine on the app. i can drive it and all. tried connecting it to my raspi again and it didnt work still. no reply from the rvr at all. i have experimented with a micro:bit and aurdino uno because i had them lying around. the microbit works. still working on using the aurdino. any other tips for me to try? ive had a look around and couldnt find much helpful to try except doing a fresh debian install.

Jim-Konish commented 1 year ago

Hi, the most common causes of communication issues between RVR and a Pi are:

  1. Bad wiring. Make sure you have a ground connection via either the USB port or the UART port, and try other jumpers in case your wires or wire connectors have been damaged.
  2. Bad UART baud rates on the Pi. The default Pi UART hardware ties its baud rates to the CPU clock speed, which in turn depends on operating conditions. There are workarounds to fix this, either by disabling Bluetooth and reassigning the good UART to the GPIO header, or by locking the CPU clock frequency. More details in my next comment
  3. Low operating voltage on the Pi. Don't ignore low voltage warnings, as operation of the Pi CPU is not guaranteed. A shorter USB cable with heavier wire gauge may be required depending on Pi usage.
Jim-Konish commented 1 year ago

The feature/use-tty-symlinks branch uses serial0 to access the UART. IIRC this will always point it to the UART connected to the GPIO header.

After that, you can use either of the workarounds described in the second post in this Raspberry Pi forum thread to correct the Pi baud rate issue.

It seems most Pi units do not exhibit baud rate issues, which is why we weren't able to reproduce the issue and find a solution until recently. We plan to update our instructions and the quick start SD card image to address this, but it hasn't hit the top of the priority queue yet.

fwuffyboi commented 1 year ago

Thank you @Jim-Konish. I'll try your recommendations to fix it very soon!

stefan-ctrl commented 1 year ago

Thanks for the hint with the power cable. This did the trick for me.