This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
misc:hacks:rasberrypi [2013-08-13 03:54] absoloodle37 Identified xbox controller input and corresponding id's in .json file |
misc:hacks:rasberrypi [2021-06-24 16:45] kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and will be archived. Please go to [[https:// | ||
+ | </ | ||
====== Using the Raspberry Pi as a base station for flying ====== | ====== Using the Raspberry Pi as a base station for flying ====== | ||
- | You should setup the CF Headless client (see [[# | + | 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 full SD-card image, and instructions on how to install it are located [[http:// | ||
+ | |||
+ | Instead of the official Python headless client, there is also a working Ruby version of the headless client, developed by a user. This version, called Crubyflie, can be installed on top of the SD-card image described above or on a standalone version of Linux/ | ||
+ | |||
+ | ====== Manual Installation ===== | ||
+ | |||
+ | As an alternative to a full SD-card image, you can manually install the headless Python client as a program on your Pi. | ||
For the following installation instructions it is assumed that you are running the popular [[http:// | For the following installation instructions it is assumed that you are running the popular [[http:// | ||
Line 26: | Line 37: | ||
| | ||
and start it: '' | and start it: '' | ||
+ | |||
+ | <WRAP center round tip 80%> | ||
+ | **NOTE** | ||
+ | |||
+ | 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. | ||
+ | </ | ||
Plugin your Crazyradio and your controller, power up the Crazyflie and start the client (via SSH and Ethernet or by using an USB hub to connect Crazyradio, controller and keyboard)((If you get an error message that '' | Plugin your Crazyradio and your controller, power up the Crazyflie and start the client (via SSH and Ethernet or by using an USB hub to connect Crazyradio, controller and keyboard)((If you get an error message that '' | ||
Line 157: | Line 174: | ||
</ | </ | ||
- | and (as root) create a file ''/ | + | and (as root) you will create a file ''/ |
<code bash> | <code bash> | ||
Line 175: | Line 192: | ||
</ | </ | ||
- | You can only create the cfheadless file above in the /root/bin/ folder by being root--not pi or any other user name. Switch to root: '' | + | You can only create the cfheadless file above in the /root/bin/ folder by being root--not pi or any other user name. Switch to root: '' |
- | <code bash> | + | For the XBox360 Controller (after an " |
- | </ | + | |
- | + | ||
- | The -h halts all processes, the -r is the command to reboot after shutdown. | + | |
- | + | ||
- | This should now take care to startup the headless client when you plug in the dongle and (hopefully ;-)) kill it again when you unplug. If you need any additional setup to get your controller working, you can add a similar udev-rule for that to take care of everything upon plugging in the controller as well. An example for the Microsoft Wireless XBox360 controller for PC can be found [[http:// | + | |
- | + | ||
- | And for the XBox360 Controller (after an " | + | |
Create a udev file ''/ | Create a udev file ''/ | ||
Line 197: | Line 207: | ||
killall -9 xboxdrv | killall -9 xboxdrv | ||
fi</ | fi</ | ||
+ | |||
+ | Don't forget to make your files executable after you've created them: '' | ||
+ | |||
+ | <code bash> | ||
+ | </ | ||
+ | |||
+ | The -h halts all processes, the -r is the command to reboot after shutdown. | ||
+ | |||
+ | This should now take care to startup the headless client when you plug in the dongle and (hopefully ;-)) kill it again when you unplug. If you need any additional setup to get your controller working, you can add a similar udev-rule for that to take care of everything upon plugging in the controller as well. | ||
:!: **Important** :!: Due to the current state of the client, you **must** make sure to first connect your controller and power up the Crazyflie before connecting the Crazyradio dongle and thus starting the client. If the client can't find either controller or Crazyflie, it will just hang and you'll have to re-plug the dongle again. | :!: **Important** :!: Due to the current state of the client, you **must** make sure to first connect your controller and power up the Crazyflie before connecting the Crazyradio dongle and thus starting the client. If the client can't find either controller or Crazyflie, it will just hang and you'll have to re-plug the dongle again. |