Put your drone on a longer leash executing programmed flight on a powered Pi zero. Second part of a YOLO object recognition project using Hologram Nova, see here. Contest entry with additional information here. More drone hacking here. We modified this repo for ardrone control on our raspberry pi.
We used:
Requirements:
The wiring of the pi is very simple for this project. We used a USB to TTL converter to power the raspberry pi through the GPIO pins using the drone's battery. Connecting the power and ground pins to pins 2 and 6 of the pi. Connect the usb end to the usb port at the top of the AR Drone 2.0 next to the battery, where you would normally plug in a usb to store video. Other than that, connect the pi cam using the ribbon cable for pi zero and use a microusb to usb converter to plug in the Hologram Nova.
Compatibility between project dependencies requires python3.4 as default python3. You should burn this specific image for your raspberry pi zero. After making this image and wiring the pi, boot up and go through the first-time boot configuration. You should make sure to:
- Under Advanced Options, Expand filesystem
- Under Localization Options change timezone
- Change User password
After a reboot, git clone this repo
cd ~/
git clone https://github.com/smellslikeml/cell_pwn_drone
cd cell_pwn_drone
And run the install script
./install.sh
./ardrone_setup.py
DEVICEKEY = 'YOUR-HOLOGRAM-DEVICE-KEY-HERE'
- Set
/etc/wpa_supplicant/wpa_supplicant.conf
to the drone's SSID
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="ardrone2_#####"
}
-
Reboot, connect peripherals, note the time (Pi off wifi on drone network)
-
As root (sudo su), set crontab for the time based on start time
$ sudo su
$ crontab -e
#In your crontab,
<minute> <hour> * * * /home/pi/cell_pwn_drone/main.py >> flight.log 2>&1
-
Unplug keyboard, plug in Hologram Nova
-
From Hologram Dashboard, prepare for 'land' command to break flight
-
Unplug HDMI after reboot and position drone
-
Monitor flight with Hologram dashboard for kill switch