3. Prep your Pi

3. Prep your Pi

In order to use the Raspberry Pi with the BrickPi, a few quick steps must be taken to prepare the BrickPi.

Mandatory

The changes you will need to make are now listed here, under Pi Prep. You can see the list of changes we made to the SD card and Raspberry Pi.

 

The rest of these instructions are simply ways that we found to make your life easier when turning your stationary computer into a robot . . . .

WIFI

We also recommend using WIFI.  Wifi makes your BrickPi suddenly . . . wireless!  We have had fantastic and simple success with the Adafruit Wifi Dongle.  You can set this up to automatically get on your network when the Raspberry Pi boots:

Then Open Network interfacs config file:  sudo nano /etc/network/interfaces

Make sure these are in place:

  • auto wlan0
  • allow-hotplug wlan0
  • iface wlan0 inet manual
  • wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

Modify supplicant: sudo nano /etc/wpa_supplicant/wpa_supplicant.confctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

And there you can enter in your ssid, psk, and other WIFI network information.  Save it and restart it to see if you’re automatically connected to WIFI on startup.

Python on Startup

If you want to run  your python script on Raspberry Pi bootup, it makes working with the BrickPi much easier.  Rather than fire up the Raspberry Pi, plug in a monitor and keyboard, and select your program, you can simply start up the Raspberry Pi and let her go!

To do this:

  • sudo nano /etc/rc.local
  • python <yourscriptname>.py