Jetson Nano + Sphero RVR Mash-up (PART 2)
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...
- 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
- The RX/TX switch on the pHAT is set to “RVR”
- 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…
Run the basic command drive example:
sudo python3 drive_raw_motors.py
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
sudoto run the script!
lscommand 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.