User Tools

Site Tools


projects:crazyflie:binaries:raspberrypi

This is an old revision of the document!


Bitcraze Raspberry Pi SD-card image

In order to make it easy for users that have a Raspberry Pi to test out our headless client we prepared an SD-card image that is ready to use out of the box. The image is based on the Raspbian distribution, more specifically the Wheezey version that can be downloaded from this torrent.

We haven't removed anything from the image, just added our own stuff. So you can still log in and used the Raspberry Pi as you would with the Raspbian Wheezy image, but as an added feature you can also use our stuff. If you would like to re-create the SD-image with your own Wheezy image then have a look at what we did.

The changes made to the SD-card is mostly based of the contributed instructions from the hacks section.

Download

The SD-card image can be downloaded here:

  • Bitcraze Raspian image 0.1 torrent (preferred)
  • Bitcraze Raspian image 0.1 direct download (limited to 6 simultaneous downloads)

SD-image info

Size: 2 GB
User: bitcraze
Pass: crazyflie

What's added to the image

There's a list of what's added:

  • UDEV rules for access to the Crazyradio and NRF bootloader
  • crazyflie-pc-client and crazyradio-firmware pre-cloned
  • pyusb and pygame
  • UDEV rules to automatically launch the cfheadless client when Crazyradio is plugged in
  • Driver for the Xbox 360 wireless controller and automatic start of the utilities
  • Mercurial

Creating the SD-card

First of all you have to write the image to the SD-card. There are good instructions on how to do this here.

Expanding the partition to use all available space on you SD card: The raspi-config script

When you start your Pi the display shows the output from each of the start-up scripts (as lots of scrolling text). If starting for the first time using a new image you are logged in as a root user, and the raspi-config menu will then appear. It can also be started at any time from the command line or from a terminal window (see below).

It has the following entries (this is the layout from the Raspian 2012-12-16 image. It may be different on other images):

Raspi-config
  
 info                Information about this tool
 expand_rootfs       Expand root partition to fill SD card
 overscan            Change overscan
 configure_keyboard  Set keyboard layout
 change_pass         Change password for 'pi' user
 change_locale       Set locale
 change_timezone     Set timezone
 memory_split        Change memory split
 ssh                 Enable or disable ssh server
 boot_behaviour      Start desktop on boot?
 update              Try to upgrade raspi-config
  
     <Select>                    <Finish>

Select the expand_rootfs option and follow the onscreen instructions. After a reboot of the Pi, your available disk space will be maximized to the actual size of the SD card (4GB, 8GB, 16GB, etc.).

Once your Pi is running, at the command prompt, be sure to update to the latest version:

sudo apt-get update

How to use the SD-card image

First of all you need to set up what controller and link settings you are using. This is done by editing the two files in the folder /home/bitcraze named controller.conf and link.conf. They should only contain one row each.

To fly first insert the USB controller, then power on the Crazyflie and lastly insert the Crazyradio. This will start the cfheadless client and connect to the Crazyflie. In a few seconds you sould be ready to fly.

To quick either power off the Crazyflie or pull-out the Crazyradio.

In order to restart flying you have to pull-out the Crazyradio dongle and insert it again.

Troubleshooting

Try to pull-out and insert the Crazyradio. Then wait up to 10 seconds before you try to control the Crazyflie.

If you see the LED on the Crazyradio blinking green, then it's connected. If it's blinking red it means that it cannot connect to the Crazyflie.

Check logfile /tmp/cfheadless.log for messages

FAQ

How do I get the RedOctane Xbox360 controller to work

You will have to edit the /root/bin/xbox file to contain the following to get the RedOctaine xbox360 (1430:f801) controller to work:

#!/bin/sh
if test "$ACTION" = "add"
then
/usr/bin/xboxdrv --device-by-id 1430:f801 --type xbox360 --axismap X2=X1,Y2=Y1,X1=X2,Y1=Y2 &
else
killall -9 xboxdrv
fi
projects/crazyflie/binaries/raspberrypi.1380943730.txt.gz · Last modified: 2015-07-15 16:30 (external edit)