Writing your Java program
Open the NetBeans IDE and create a new project named ZumoRobot
.
- In the menu bar, click
File
|New Project
. TheNew Project
wizard will appear. In theNew Project
wizard, click onJava
underCategories
and click onJava Application
underProjects
. Then click theNext
button:

Figure 5-20: Creating ZumoRobot project with NetBeans IDE - step 1. Image credits: Courtesy of Adafruit (https://www.adafruit.com/)
- In the
Name and Location
step, typeZumoRobot
for theP
roject Name
andcom.packt.B05688.chapter5.ZumoRobot
for theCreate Main
Class
. Click theFinish
button to create the project:

Figure 5-21: Creating ZumoRobot project with NetBeans IDE - step 2. Image credits: Courtesy of Adafruit (https://www.adafruit.com/)
- The NetBeans IDE will create a file named
ZumoRobot.java
and the project environment for you. - To work with Raspberry Pi GPIO pins, you should add the
Pi4j
library to your project as discussed in Chapter 1, Setting up Your Raspberry Pi. - Listing 5-1 presents the complete...