This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
misc:hacks:rasberrypi [2013-05-21 13:50] foosel [Current state of the headless client] |
misc:hacks:rasberrypi [2013-06-10 00:54] absoloodle37 corrected typo |
||
---|---|---|---|
Line 29: | Line 29: | ||
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 '' | ||
- | python ~/ | + | python ~/ |
The client should start up, hopefully find your Crazyradio dongle, your Crazyflie and your controller and start accepting commands: | The client should start up, hopefully find your Crazyradio dongle, your Crazyflie and your controller and start accepting commands: | ||
Line 81: | Line 81: | ||
INFO: | INFO: | ||
INFO: | INFO: | ||
+ | </ | ||
+ | |||
+ | **Note**: If you used a Windows 7 PC and the cfclient GUI to create a customized .json file for your xbox controller and plan to copy it over to your Raspberry Pi here is some advice: | ||
+ | |||
+ | -save the new .json file as something different than the default, so you can recognize it easily. | ||
+ | |||
+ | -the new .json file is not located in the Program Files(x64)/ | ||
+ | |||
+ | -copy your new .json file into the correct RPi folder: / | ||
+ | |||
+ | -the cfheadless client on RPi may not recognize the same controller channel " | ||
+ | |||
+ | |||
+ | **Note**: If you have more than one controller attached, you can select the one to use using the commandline parameter '' | ||
+ | |||
+ | < | ||
+ | usage: cfheadless [-h] [-u URI] [-i INPUT] [-d] [-c CONTROLLER] | ||
+ | [--controllers] | ||
+ | |||
+ | optional arguments: | ||
+ | -h, --help | ||
+ | -u URI, --uri URI URI to use for connection to the Crazyradio dongle, | ||
+ | defaults to radio:// | ||
+ | -i INPUT, --input INPUT | ||
+ | Input mapping to use for the controller, defaults to | ||
+ | PS3_Mode_1 | ||
+ | -d, --debug | ||
+ | -c CONTROLLER, --controller CONTROLLER | ||
+ | Use controller with specified id, id defaults to 0 | ||
+ | --controllers | ||
</ | </ | ||
Line 115: | Line 145: | ||
if test " | if test " | ||
then | then | ||
- | / | + | / |
echo $! > / | echo $! > / | ||
else | else | ||
Line 127: | Line 157: | ||
</ | </ | ||
- | Don't forget to make it executable: '' | + | 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: '' |
And for the XBox360 Controller (after an " | And for the XBox360 Controller (after an " | ||
Line 145: | Line 175: | ||
:!: **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. | ||
- | **Troubleshooting** If it still doesn' | + | **Troubleshooting** |
- | * / | + | If it still doesn' |
+ | * / | ||
* / | * / | ||
+ | |||
+ | Also, if xboxdrv can't be run without the sudo command, or there are other permissions issues with the xbox wireless usb controller, try adding the the xbox360 wireless receiver to a group that has root privileges. | ||
+ | |||
+ | Also, if running the xboxdrv command from a terminal window gives you the following error: 'Error couldn' | ||
+ | |||
===== Make your base station portable ===== | ===== Make your base station portable ===== | ||