Jetson Nano + Sphero RVR Mash-up (PART 2)

Contributors: D___Run___
Favorited Favorite 2

Hardware Test

Now that the SDK is installed on your NVIDIA Jetson Nano and we have permission to read and write to the UART, it is now time to test it to make sure that your NVIDIA Jetson Nano can communicate with the RVR and send it commands via the SDK in a Python script.

A Quick Hardware Check

Before we go and test out the SDK there are a few things that we want to double check...

  1. Double check the 4 pin UART rainbow cable is hooked up properly with power, ground and RX / TX aligned correctly both to the RVR as well as the pHAT
  2. The RX/TX switch on the pHAT is set to “RVR”
  3. Battery is hooked up the the NVIDIA Jetson Nano via the USB-C Connector on the pHAT

An initial SDK Test

Lucky for us the SDK comes with a number of example scripts that we can use to test the SDK. From the terminal window in Jupyter Notebooks execute the following command:

Navigate to the example directory for driving… cd sphero-sdk-raspberrypi-python/getting_started/observer/driving/

Note: The next command, if it is successful, will cause the RVR to drive around. Make sure you have the treads off the ground or it is in a safe a clear area for it to move (read as make sure it’s not going to drive off of a table)

Run the basic command drive example: sudo python3

Your RVR should drive back and forth and pivot a bit if all is successful.

If you have an error or nothing seems to work try out the following troubleshooting tips..

  • Make sure you are using sudo to run the script!
  • Use ls command to list the contents of the directory you are in and make sure the script you are trying to run is there any you have spelled everything correctly.
  • Double check that you have installed the SDK and possibly repeat the process if needed.