This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:crazyflie:binaries:raspberrypi [2013-07-06 14:51] macke |
projects:crazyflie:binaries:raspberrypi [2020-05-12 14:26] (current) kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https:// | ||
+ | </ | ||
+ | |||
====== Bitcraze Raspberry Pi SD-card image ====== | ====== 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 [[http:// | + | 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 [[http:// |
- | We haven' | + | We haven' |
- | ====== What did we change ====== | + | The changes made to the SD-card |
- | Here's a step by step guide to what we added. So if you don't want to use our image, you can get another one and set it up yourself. Most of this stuff is based of the contributed instructions from the [[projects: | + | |
- | Before you get started | + | ====== Download ====== |
- | * An SD-card that's at least 2GB | + | The SD-card image can be downloaded here (version 2015.3 and onward is compatible |
- | * An ethernet cable to connect the Pi to your network | + | * Bitcraze Raspbian image 2015.3 ([[http:// |
- | * A power cord to power it | + | * Bitcraze Raspbian image 0.3 ([[http:// |
- | * An SD-card reader for a computer | + | * Bitcraze Raspbian image 0.2 ([[http:// |
+ | * Bitcraze Raspbian image 0.1 ([[http:// | ||
- | First of all you have to write the image to the SD-card. There are good instructions on how to do this [[http:// | ||
- | Now plug the SD-card into the Pi, attach all the cables and SSH to it. Log in user the username pi and the password raspberry | + | <WRAP center round info > |
+ | // | ||
+ | Using Torrent is advised, we have added webseed so it is faster than direct download | ||
+ | </ | ||
- | Most of these commands require root user, so switch to root: | + | ====== Installing in an existing Raspbian sdcard ====== |
- | < | + | |
- | sudo su | + | |
- | </ | + | |
- | Let's create | + | If you already have a running raspbian system no need to download |
- | < | + | |
- | useradd bitcraze -m -p crazyflie -G adm, | + | |
- | </ | + | |
- | Now install everything that we might need fro running the Crazyradio, controllers and the headless client. | ||
< | < | ||
- | apt-get -y install mercurial python2.7 python-usb python-pygame xboxdrv | + | curl https://raw.githubusercontent.com/ |
</ | </ | ||
- | The shebang in the cfheadless client uses / | ||
- | < | ||
- | cd /usr/bin | ||
- | ln -s python2.7 python2 | ||
- | </ | ||
- | In order to be able to use the Raspberry Pi without having any keyboard/ | + | ====== SD-image info ====== |
< | < | ||
- | touch / | + | Size: 4 GB |
- | nano / | + | User: pi |
+ | Pass: raspberry | ||
</ | </ | ||
- | Put the following text in the file: | + | (version before 2015.3 had bitcraze/crazyflie as username/password) |
- | < | + | |
- | SUBSYSTEM==" | + | |
- | SUBSYSTEM==" | + | |
- | </ | + | |
- | < | + | ====== What's added to the image ====== |
- | touch / | + | There' |
- | nano /etc/udev/rules.d/99-xboxdrv.rules | + | * UDEV rules for access to the Crazyradio and NRF bootloader |
- | </ | + | * crazyflie-pc-client pre-cloned at latest stable version |
+ | * pyusb | ||
+ | * 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 | ||
- | Add xbox: | + | ====== |
- | < | + | First of all you have to write the image to the SD-card. There are good instructions on how to do this [[http://elinux.org/RPi_Easy_SD_Card_Setup# |
- | SUBSYSTEM==" | + | |
- | </code> | + | |
- | Now we should create | + | ====== 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 |
- | mkdir /root/bin/ | + | |
- | touch / | + | |
- | chmod +x / | + | |
- | nano / | + | |
- | </ | + | |
- | And add the following text: | + | To fly first insert |
- | < | + | |
- | #!/bin/sh | + | |
- | if test " | + | |
- | then | + | |
- | / | + | |
- | echo $! > / | + | |
- | else | + | |
- | killall -9 cfheadless | + | |
- | if test -f /tmp/cfheadless.pid | + | |
- | then | + | |
- | PID=`cat / | + | |
- | kill -9 $PID | + | |
- | fi | + | |
- | fi | + | |
- | </ | + | |
- | < | + | To quit either power off the Crazyflie or pull-out the Crazyradio. |
- | touch / | + | |
- | chmod +x / | + | In order to restart flying you have to pull-out the Crazyradio dongle and insert it again. |
- | nano / | + | |
- | </ | + | ====== 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. | ||
- | Also create | + | Check logfile / |
+ | |||
+ | ====== FAQ ====== | ||
+ | ===== How do I get the RedOctane Xbox360 controller | ||
+ | You will have to edit the '' | ||
< | < | ||
#!/bin/sh | #!/bin/sh | ||
if test " | if test " | ||
then | then | ||
- | | + | / |
else | else | ||
- | | + | killall -9 xboxdrv |
fi | fi | ||
</ | </ | ||
- | + | {{tag>update_on_pi_release}} | |
- | ..... | + | |
- | + | ||
- | Now switch to the newly created bitcraze user by first exiting switching back to the pi user and then bitcraze: | + | |
- | <code> | + | |
- | exit | + | |
- | sudo su bitcraze | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | cd | + | |
- | mkdir projects | + | |
- | cd projects | + | |
- | hg clone https:// | + | |
- | hg clone https:// | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | echo PS3_Mode_1 > / | + | |
- | echo radio:// | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | touch start_cfheadless | + | |
- | chmod +x start_cfheadless | + | |
- | nano start_cfheadless | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | / | + | |
- | </ | + | |
- | + | ||
- | ====== How to ====== | + |