Sharing Good Practice
ii. Land: Land on the ground.
6. Save and Run the project to test
the look of the GUI panel. The Run
option can be found in the menu of
NetBeans.
iii. Stop: Stop drone functions and
exit the control panel.
Phase 1 Conclusion:
In this phase we created a control
panel using simple Java GUI to control
two functions of the drone i.e. TakeOff and Land. The third button is to
stop and exit the control panel.
Phase 2: In this phase you will connect
the GUI buttons that was created in
the previous phase to the functions
that control the drone.
4. Fly the drone from your control
panel.
d. If the file was included correctly
you should see the Jar file
included in the Library folder of
your project.
Phase 2 Steps:
1. Add Library to the DronePanel
Project.
a. A Library is a set of programs that
are already made available for a
specific purpose. Java libraries
are usually called JAR files.
b. Download the Jar file for drone
functions
i. In your browser, navigate to the
following location2 (copy paste
the URL to your browser):
h t t p: // v s i s - w w w. i n f o r m a t i k .u n i hamburg.de/oldSer ver/teaching /
projects/yadrone/download.html
ii. Under Vers. 0.32, build:2014-01-17
2. 2. Initial
Configuration
in
ControlPanel.java, source file (see
figure below).
a. Double
mouse
click
the
ControlPanel.java file under
Source Packages.
b. Make the following changes as
shown in figure below
i. Create a global instance of
IARDrone class
ii. Initialize the Drone Managers
iii. Import the two class ARDrone
and IARDrone
iii. Click on: jar (Library Only)
iv. This will download the file:
yadrone_032.jar,
to
your
computer.
c. Include the Jar file into the
project that was created in Phase
1 (see figure below).
i. Right mouse click on the Project
name in the left panel.
ii. Go to the Properties of the
project
iii. Select Libraries from Categories
iv. Click on Add Jar/Folders on the
right
3. Next, the functions for three button
are added to the source code.
v. Select the downloaded Jar
file (yadrone_032.jar) on your
computer, to include it into your
project
a. Make the following changes to
the methods as shown in figure
below.
i. Take Off: Lift from the ground
and wait for 5 sec.
a. Connect your computer/laptop
to the Wi-Fi of the AR.Drone 2.0.
b. Run the above application.
c. Ensure that the Drone is kept in
an open space at a safe distance
from people.
d. Ensure to have the outdoor hull
attached on the drone for safety.
e. click the TakeOff button on your
control panel; the drone should
lift from the ground.
f. Click the Land button on your
control panel; the drone should
land.
g. Click the Stop button to close
the Control Panel.
The above tutorial introduced the use
of Java, to program two functions of
the drone, i.e. take-off, and land. The
yadrone jar file provides many more
APIs3 to program different features of
the drone and it also supports Android
development. The tutorial presented
one of the many ways that drones are
programmed, for a different approach
check out www.nodejs.org.
Conclusion
The growing interests in drones and
the various possibilities they present
are indicators of how computers and
IT are changing our future. Innovative
applications and services are foreseen
as faster and robust version of drones
hit the market. This article introduced
the basic features of drones and some
application areas. A step-by-step
guide on how to program the Parrot
AR.Drone 2.0, is presented to help
ICT teachers and students to have a
hands-on approach with drones.
Hidden away in many young minds
are some of the great and novel
applications for drones. A few
institutions like the College of IT, U)U