Connecting to the hardware
Connecting to Parrot 2.0 is also quite easy; you'll just need to connect to its WLAN access point. However, to add control via a programming language, such as Python, you'll need to install some libraries for the Raspberry Pi. First, let's download the libraries. You'll get these from https://github.com/venthur/python-ardrone. Download the files to your Raspberry Pi by typing wget https://github.com/venthur/python-ardrone. Now create a simple program to demonstrate that the system works. Here is the code:
import libardrone from time import sleep drone = libardrone.ARDrone() drone.takeoff() sleep(3) drone.move_forward() sleep(2) drone.land() sleep(3) drone.halt()
This program is quite simple. You import the library and create an instance of your quadcopter as a drone. Then you issue a command to have your quadcopter take off and hover for three seconds, after which you move forward for two seconds, then...