This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
projects:crazyflie:pc_utils:raspberrypi [2013-07-07 09:03] macke created |
projects:crazyflie:pc_utils:raspberrypi [2021-06-24 16:47] (current) kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and will be archived. Please go to [[https:// | ||
+ | </ | ||
====== Modifying the Raspian Wheezy image ====== | ====== Modifying the Raspian Wheezy image ====== | ||
- | 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: | + | 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 [[misc: |
+ | |||
+ | <WRAP center round info> | ||
+ | // | ||
+ | Since version 2015.3 you can setup your own SDCard in [[projects: | ||
+ | </ | ||
Before you get started with this you need a few things: | Before you get started with this you need a few things: | ||
- | * An SD-card that's at least 2GB | + | * An SD-card that's at least 4GB |
* An ethernet cable to connect the Pi to your network | * An ethernet cable to connect the Pi to your network | ||
* A power cord to power it | * A power cord to power it | ||
Line 12: | Line 21: | ||
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 and accept the fingerprint. | 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 and accept the fingerprint. | ||
- | Most of these commands require root user, so switch to root: | + | <WRAP center round tip> |
- | <code> | + | // |
- | sudo su | + | All modern Linux distribution now have a kernel driver for the x-box gamepad. Thus it is unlikely the //xboxdrv// user-space driver is needed. |
- | </code> | + | </WRAP> |
- | Let's create a user named bitcraze with the password crazyflie and add it to all the user groups. | ||
- | < | ||
- | 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 | ||
- | </ | ||
- | The shebang in the cfheadless client uses / | + | Lets install everything that we might need fro running |
< | < | ||
- | cd /usr/bin | + | sudo apt-get -y install python-usb xboxdrv |
- | ln -s python2.7 python2 | + | |
</ | </ | ||
In order to be able to use the Raspberry Pi without having any keyboard/ | In order to be able to use the Raspberry Pi without having any keyboard/ | ||
< | < | ||
- | touch / | + | sudo touch / |
- | nano / | + | sudo nano / |
</ | </ | ||
Line 47: | Line 46: | ||
In order for the Xbox 360 wireless controller to work the xboxdrv utility has to be installed and launched when the controller is connected. So add a new udev rule for this. | In order for the Xbox 360 wireless controller to work the xboxdrv utility has to be installed and launched when the controller is connected. So add a new udev rule for this. | ||
< | < | ||
- | touch / | + | sudo nano / |
- | nano / | + | |
</ | </ | ||
Put the following into the text file: | Put the following into the text file: | ||
Line 57: | Line 55: | ||
Now we should create the file used to launch/kill the cfheadless client. Create the file and edit it: | Now we should create the file used to launch/kill the cfheadless client. Create the file and edit it: | ||
< | < | ||
- | mkdir / | + | sudo mkdir / |
- | touch / | + | sudo touch / |
- | chmod +x / | + | sudo chmod +x / |
- | nano / | + | sudo nano / |
</ | </ | ||
Line 81: | Line 79: | ||
< | < | ||
- | touch / | + | sudo touch / |
- | chmod +x / | + | sudo chmod +x / |
- | nano / | + | sudo nano / |
</ | </ | ||
Line 97: | Line 95: | ||
</ | </ | ||
- | Now we are finished with the system setup so switch to the newly created bitcraze user by first exiting switching back to the pi user and then bitcraze: | + | Go to the pi users home directory and clone the PC client and Crazyradio firmware projects. |
- | < | + | |
- | exit | + | |
- | sudo su bitcraze | + | |
- | </ | + | |
- | + | ||
- | Go to the bitcraze | + | |
< | < | ||
cd | cd | ||
mkdir projects | mkdir projects | ||
cd projects | cd projects | ||
- | hg clone https://bitbucket.org/ | + | git clone https://github.com/ |
- | hg clone https:// | + | |
</ | </ | ||
Create the script that will execute when the Crazyradio is inserted. This will launch the cfheadless client. | Create the script that will execute when the Crazyradio is inserted. This will launch the cfheadless client. | ||
< | < | ||
+ | cd | ||
touch start_cfheadless | touch start_cfheadless | ||
chmod +x start_cfheadless | chmod +x start_cfheadless | ||
Line 120: | Line 112: | ||
Insert the following text into the file: | Insert the following text into the file: | ||
< | < | ||
- | /home/bitcraze/ | + | /home/pi/ |
</ | </ | ||
Now the last part, the configuration. The script above will launch the cfheadless client with the controller and link configuration that is written in the two files ''' | Now the last part, the configuration. The script above will launch the cfheadless client with the controller and link configuration that is written in the two files ''' | ||
< | < | ||
- | echo PS3_Mode_1 > /home/bitcraze/ | + | echo PS3_Mode_1 > /home/pi/ |
- | echo radio:// | + | echo radio:// |
</ | </ | ||
Line 133: | Line 125: | ||
That's it! Now you can connect the controller, start the Crazyflie and insert the Crazyradio and you are ready to fly. | That's it! Now you can connect the controller, start the Crazyflie and insert the Crazyradio and you are ready to fly. | ||
+ | {{tag> |