O'Reilly logo

Raspberry Pi Robotic Blueprints by Richard Grimmett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the RC car using Raspberry Pi in Python

The hardware is ready, now you can access all this functionality from Raspberry Pi. First, install the library associated with the control board, found at http://www.monkmakes.com/?page_id=698. Perform the following steps:

  1. Run the command wget https://github.com/simonmonk/raspirobotboard2/raw/master/python/dist/rrb2-1.1.tar.gz—this will retrieve the library.
  2. Then run tar -xzf rrb2-1.1.tar.gz—this will unarchive the files.
  3. Type cd rrb2-1.1—this will change the directory to the location of the files.
  4. Type sudo python setup.py install—this will install the files.

Now you'll create some Python code that will allow you to access both the drive motor and the steering motor. The code will look similar to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required