About the Author |
|
xvii | |
About the Technical Reviewer |
|
xix | |
Acknowledgments |
|
xxi | |
|
|
1 | (2) |
|
|
2 | (2) |
|
The "Best" Raspberry Pi for Robotics |
|
|
4 | (2) |
|
The "Best" Raspberry Pi for IoT |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (6) |
|
|
13 | (1) |
|
|
13 | (1) |
|
|
14 | (1) |
|
Why Remote Development Using NetBeans? |
|
|
15 | (3) |
|
|
18 | (1) |
|
|
19 | (2) |
|
Chapter 2 Raspberry Pi 3 Model B+ Setup |
|
|
21 | (1) |
|
|
21 | (1) |
|
Choose the Operating System |
|
|
22 | (1) |
|
Load Raspberry Pi OS on the microSD Card |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
24 | (7) |
|
Boot and Configure Raspberry Pi OS |
|
|
31 | (1) |
|
|
31 | (8) |
|
Configure Remote Computing |
|
|
39 | (1) |
|
Configure the Interface Capabilities |
|
|
40 | (3) |
|
Install Java on Raspberry Pi OS |
|
|
43 | (1) |
|
|
44 | (1) |
|
Check for Prior Java Installations |
|
|
44 | (2) |
|
|
46 | (1) |
|
|
46 | (1) |
|
|
47 | (1) |
|
|
48 | (1) |
|
Chapter 3 Raspberry Pi Zero W Setup |
|
|
49 | (22) |
|
|
49 | (1) |
|
Choose the Operating System |
|
|
50 | (1) |
|
Load Raspberry Pi OS on the microSD Card |
|
|
50 | (1) |
|
|
50 | (4) |
|
Finish the Bootable microSD Card |
|
|
54 | (2) |
|
Boot and Configure Raspberry Pi OS |
|
|
56 | (1) |
|
|
56 | (1) |
|
|
57 | (1) |
|
Update and Upgrade Raspberry Pi OS |
|
|
58 | (1) |
|
|
58 | (6) |
|
Configure the Interface Capabilities |
|
|
64 | (2) |
|
Install Java on Raspberry Pi OS |
|
|
66 | (1) |
|
|
66 | (1) |
|
Check for Prior Java Installations |
|
|
67 | (1) |
|
|
67 | (3) |
|
|
70 | (1) |
|
Chapter 4 Set Up the Workstation |
|
|
71 | (12) |
|
Remote Computing with SSH |
|
|
71 | (2) |
|
Remote Computing with VNC |
|
|
73 | (1) |
|
|
73 | (1) |
|
Get and Start the VNC Viewer |
|
|
74 | (3) |
|
|
77 | (4) |
|
|
81 | (2) |
|
Chapter 5 Remote Java Development with NetBeans |
|
|
83 | (40) |
|
Choose NetBeans and Java Versions |
|
|
83 | (1) |
|
|
84 | (3) |
|
|
87 | (3) |
|
Test the NetBeans Installation |
|
|
90 | (5) |
|
Configure the Raspberry Pi As a Remote Platform |
|
|
95 | (5) |
|
|
100 | (2) |
|
|
102 | (1) |
|
|
102 | (1) |
|
|
103 | (1) |
|
Examine Variables While Debugging |
|
|
104 | (1) |
|
|
105 | (1) |
|
Run on the Raspberry Pi Without NetBeans |
|
|
106 | (2) |
|
Leverage NetBeans in Complex Projects |
|
|
108 | (1) |
|
Create and Test Libraries |
|
|
109 | (4) |
|
|
113 | (4) |
|
Choose Which Program to Run from NetBeans |
|
|
117 | (1) |
|
Run the Chosen Program on the Raspberry Pi Without NetBeans |
|
|
118 | (1) |
|
Just Download with NetBeans |
|
|
119 | (2) |
|
|
121 | (2) |
|
Chapter 6 Device Support in Java |
|
|
123 | (26) |
|
Find Base I/O Libraries for Java |
|
|
124 | (1) |
|
Select the Best Base I/O Library |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
126 | (1) |
|
|
127 | (1) |
|
The Base I/O Choice for This Book |
|
|
128 | (1) |
|
|
129 | (1) |
|
|
130 | (2) |
|
|
132 | (2) |
|
The Final Choice - diozero |
|
|
134 | (1) |
|
Configure diozero in NetBeans |
|
|
135 | (6) |
|
Find (and Port) Device Libraries |
|
|
141 | (2) |
|
Java Device Library and diozero Base I/O |
|
|
143 | (1) |
|
Java Device Library and Non-diozero Base I/O |
|
|
143 | (1) |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
146 | (1) |
|
|
146 | (3) |
|
Chapter 7 The diozero Base I/O API |
|
|
149 | (42) |
|
|
149 | (1) |
|
Connect Devices to a Raspberry Pi |
|
|
150 | (3) |
|
|
153 | (1) |
|
Background on Raspberry Pi Serial I/O |
|
|
153 | (2) |
|
|
155 | (1) |
|
|
156 | (1) |
|
Support for Device Identity |
|
|
157 | (7) |
|
|
164 | (1) |
|
Background on Raspberry Pi I2C |
|
|
164 | (3) |
|
|
167 | (1) |
|
|
168 | (2) |
|
|
170 | (1) |
|
Background on Raspberry Pi SPI |
|
|
170 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
173 | (1) |
|
Background on Raspberry Pi GPIO |
|
|
174 | (3) |
|
|
177 | (5) |
|
Device Library and Application Structure |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
184 | (4) |
|
|
188 | (2) |
|
|
190 | (1) |
|
Chapter 8 A DC Motor Controller |
|
|
191 | (58) |
|
|
192 | (1) |
|
|
193 | (2) |
|
|
195 | (1) |
|
Search for Java Libraries |
|
|
195 | (1) |
|
Search for Non-Java Libraries |
|
|
196 | (5) |
|
|
201 | (1) |
|
|
202 | (1) |
|
|
202 | (3) |
|
|
205 | (1) |
|
Verbatim vs. Cleansing Port |
|
|
206 | (1) |
|
|
207 | (1) |
|
|
208 | (1) |
|
Device Library Development |
|
|
209 | (3) |
|
|
212 | (2) |
|
Constructor Analysis and Implementation |
|
|
214 | (4) |
|
Mid-level Methods Analysis |
|
|
218 | (1) |
|
|
218 | (2) |
|
Low-Level Methods Analysis |
|
|
220 | (1) |
|
Mid-level Methods Implementation |
|
|
220 | (4) |
|
|
224 | (2) |
|
|
226 | (9) |
|
Complete the Implementation |
|
|
235 | (11) |
|
|
246 | (3) |
|
Chapter 9 An Inertial Measurement Unit |
|
|
249 | (84) |
|
|
250 | (2) |
|
|
252 | (1) |
|
A Search for Java Libraries |
|
|
252 | (2) |
|
A Search for Non-Java Libraries |
|
|
254 | (1) |
|
A Look at the C++ Libraries |
|
|
254 | (1) |
|
A Look at the C Libraries |
|
|
255 | (1) |
|
|
255 | (1) |
|
|
256 | (1) |
|
Play with the Device (FXAS21002C) |
|
|
257 | (2) |
|
Device Library Development (FXAS21002C) |
|
|
259 | (1) |
|
Constructor Analysis and Implementation |
|
|
260 | (5) |
|
|
265 | (3) |
|
|
268 | (3) |
|
|
271 | (5) |
|
|
276 | (15) |
|
Address Zero Offset and Noise |
|
|
291 | (11) |
|
|
302 | (4) |
|
|
306 | (1) |
|
Device Library Development (FXOS8700CQ) |
|
|
306 | (5) |
|
Constructor Analysis and Implementation |
|
|
311 | (2) |
|
|
313 | (3) |
|
|
316 | (2) |
|
|
318 | (5) |
|
|
323 | (6) |
|
|
329 | (2) |
|
|
331 | (2) |
|
|
333 | (38) |
|
|
334 | (1) |
|
|
334 | (1) |
|
|
335 | (1) |
|
|
335 | (2) |
|
|
337 | (1) |
|
|
338 | (1) |
|
|
339 | (3) |
|
Device Library Development |
|
|
342 | (1) |
|
|
342 | (1) |
|
|
343 | (1) |
|
|
344 | (4) |
|
|
348 | (4) |
|
|
352 | (4) |
|
Test the Additional Methods |
|
|
356 | (4) |
|
|
360 | (9) |
|
|
369 | (1) |
|
|
369 | (2) |
|
Chapter 11 An Environmental Sensor |
|
|
371 | (26) |
|
|
371 | (2) |
|
|
373 | (3) |
|
|
376 | (5) |
|
|
381 | (1) |
|
|
382 | (1) |
|
|
383 | (4) |
|
|
387 | (5) |
|
|
392 | (3) |
|
|
395 | (2) |
|
Chapter 12 An Analog-to-Digital Converter |
|
|
397 | (16) |
|
|
398 | (1) |
|
|
398 | (2) |
|
|
400 | (3) |
|
|
403 | (5) |
|
|
408 | (4) |
|
|
412 | (1) |
|
Chapter 13 A Stepper Motor Driver |
|
|
413 | (28) |
|
|
413 | (3) |
|
|
416 | (1) |
|
Search for Non-Java Libraries |
|
|
416 | (1) |
|
|
417 | (1) |
|
|
417 | (1) |
|
|
418 | (1) |
|
Device Library Development |
|
|
419 | (1) |
|
|
419 | (3) |
|
SilentStepStick Implementation |
|
|
422 | (1) |
|
Constructor Implementation |
|
|
423 | (5) |
|
|
428 | (4) |
|
|
432 | (5) |
|
|
437 | (2) |
|
|
439 | (2) |
|
|
441 | (32) |
|
|
441 | (1) |
|
|
442 | (4) |
|
|
446 | (1) |
|
|
447 | (1) |
|
Project Component Testing |
|
|
448 | (1) |
|
|
448 | (4) |
|
|
452 | (3) |
|
|
455 | (3) |
|
|
458 | (5) |
|
Go Beyond Initial Requirements |
|
|
463 | (4) |
|
Get Closer to the Real World |
|
|
467 | (5) |
|
|
472 | (1) |
|
Appendix A1 Arduino Command Server |
|
|
473 | (20) |
|
|
474 | (1) |
|
|
475 | (1) |
|
The Command Server Pattern |
|
|
476 | (1) |
|
The command server Sketch |
|
|
477 | (3) |
|
|
480 | (4) |
|
|
484 | (1) |
|
|
485 | (2) |
|
|
487 | (2) |
|
The Command Server As a "Device" |
|
|
489 | (1) |
|
Test the "Device" from Raspberry Pi |
|
|
489 | (3) |
|
|
492 | (1) |
|
Appendix A2 Custom Lidar Unit |
|
|
493 | (28) |
|
|
493 | (3) |
|
|
496 | (1) |
|
|
497 | (2) |
|
|
499 | (1) |
|
|
499 | (5) |
|
|
504 | (1) |
|
|
505 | (2) |
|
|
507 | (2) |
|
|
509 | (3) |
|
|
512 | (2) |
|
|
514 | (1) |
|
|
514 | (1) |
|
|
515 | (4) |
|
|
519 | (2) |
|
Appendix A3 NetBeans and Maven |
|
|
521 | (28) |
|
Create a NetBeans Project Using Maven and diozero |
|
|
523 | (3) |
|
|
526 | (3) |
|
|
529 | (3) |
|
Run TestLED with a diozero Remote Provider |
|
|
532 | (3) |
|
RunTestLED on a Raspberry Pi |
|
|
535 | (7) |
|
Automate Build, Download, Run |
|
|
542 | (4) |
|
|
546 | (3) |
Index |
|
549 | |