0
Your shopping cart is empty!

DiddyBorg v2 - Getting Started

Posted by in Build, DiddyBorg V2 - Build on October 19, 2017 . 0 Comments.

Before starting

We recommend that you setup the software for running your DiddyBorg v2 before you start assembly. These instructions assume you are running a recent copy of Raspbian, and they also assume you are using the pi user (the default for Raspbian). If you do not have your SD card setup yet you can find the downloads and instructions at http://www.raspberrypi.org/downloads. The instructions below will require the Raspberry Pi to be connected to the Internet in order to download the required software. We recommend you use a Raspberry Pi 3 with DiddyBorg v2, but other models of Raspberry Pi should work fine as long as you can mount them to the DiddyBorg v2 chassis securely.

Setting up the Raspberry Pi

Since the Raspberry Pi is harder to access inside the DiddyBorg v2, we recommend you setup SSH so you can login to the Raspberry Pi using either the WiFi or a network cable. To setup SSH access:

  1. Enter the following command in a terminal: sudo raspi-config
  2. Move down to option 5 Interfacing Options and press ENTER
  3. Move down to option P2 SSH and press ENTER
  4. Make sure Yes is highlighted and press ENTER
  5. Wait until the dialog says SSH is enabled, then press ENTER
  6. Move right until Finish is highlighted, then press ENTER

You may also want to set your router to give the Raspberry Pi a known IP address (so you can login to it later). Consult your router manual if you wish to do this.

Installing the ThunderBorg and examples

DiddyBorg v2 uses a ThunderBorg to drive the motors. We will connect the board later, for now we simply need to install the software to control it. DiddyBorg requires I2C to be enabled. If you have not done this before you can do this by:

  1. Enter the following command in a terminal: sudo raspi-config
  2. Move down to option 5 Interfacing Options and press ENTER
  3. Move down to option P5 I2C and press ENTER
  4. Make sure Yes is highlighted and press ENTER
  5. When the dialog says I2C is enabled press ENTER
  6. Move right until Finish is highlighted, then press ENTER

To run through the automatic installer just use this one line in a terminal:

bash <(curl https://www.piborg.org/installer/install-diddyborg-v2.txt)

If you would prefer to manually run through the steps use the commands below:

mkdir ~/thunderborg
cd ~/thunderborg
wget http://www.piborg.org/downloads/thunderborg/examples.zip
unzip examples.zip
chmod +x install.sh
./install.sh
mkdir ~/diddyborgv2
cd ~/diddyborgv2
wget http://www.piborg.org/downloads/diddyborgv2/examples.zip
unzip examples.zip
chmod +x install.sh
./install.sh

Once you have done this you will have two sets of examples:

  1. ThunderBorg examples in ~/thunderborg The basic motor output and LED control examples will have links on the desktop
  2. DiddyBorg v2 examples in ~/diddyborgv2 This includes some standard examples such as remote control using a gamepad or joystick

Setting up joystick control (optional)

If you wish to use a gamepad / joystick to control DiddyBorg v2 (such as a PS3 controller) you need the joystick software. You can get this by running the following command:

sudo apt-get -y install joystick

If you are using a PS3 controller it can be a little tricky to setup as you need to tell the controller to talk with the Raspberry Pi first. See either:

You can use the same instructions for a PS4 remote with the following changes:

  1. Skip using sixpair, it is not needed
  2. When trying to pair the controller press the PS and Share buttons at the same time to put the controller into pairing mode

Setting up the Raspberry Pi camera (optional)

If you want to use the Raspberry Pi camera you will also need to install some additional software libraries. Before setting up the software, turn the Raspberry Pi off and connect the camera to the Raspberry Pi. There is a great guide from the Raspberry Pi Foundation on how to setup your Pi Camera. After powering the Raspberry Pi you want to enable the camera functionality:

  1. Enter the following command in a terminal: sudo raspi-config
  2. Move down to option 5 Interfacing Options and press ENTER
  3. Move down to option P1 Camera and press ENTER
  4. Make right until Yes is highlighted and press ENTER
  5. When the dialog says the camera is enabled press ENTER
  6. Move right until Finish is highlighted, then press ENTER
  7. If asked if you would like to reboot, make sure Yes is highlighted, then press ENTER
  8. Wait for the Raspberry Pi to restart

You can check the Raspberry Pi camera is attached and working by using the following command: raspistill -d If the camera is working you should see the image from the camera on the monitor for a few seconds. If it is not working or incorrectly connected you will get error messages instead. Next we want to install the Python library for talking to the camera:

sudo apt-get -y install python-picamera

Finally if we want to do image processing then we want the OpenCV libraries as well. This is needed for most examples which make use of the camera for doing their processing. The download is a bit larger and may take a while:

sudo apt-get -y install libcv-dev libopencv-dev python-opencv

Before assembling your DiddyBorg v2

Now we have all the code ready to go, there are a few things we want to do before assembling it:

  1. If you plan to use either VNC or SSH to talk to the Raspberry Pi once assembled check they work before assembly
  2. If you are using a joystick to control DiddyBorg v2, attach it to the Raspberry Pi and use jstest to check it works
    See our JoyBorg script page for instructions on how to check this
  3. If you wish to use any other devices (such as a WiFi dongle), now is the best time to set them up and make sure they work
  4. Finally before assembling power the Raspberry Pi off and detach the camera

Once you have assembled your DiddyBorg v2 head over to the examples page to see what DiddyBorg v2 can do and get started with your own projects :)

Last update: October 26, 2017

Comments

Leave a Comment

Leave a Reply

* Name:
* E-mail: (Not Published)
   Website: (Site url with http://)
* Comment:
Verification code: