وبلاگ بلیان

Java on the Raspberry Pi : Develop Java Programs to Control Devices for Robotics, IoT, and Beyond

معرفی کتاب «Java on the Raspberry Pi : Develop Java Programs to Control Devices for Robotics, IoT, and Beyond» نوشتهٔ Greg Flurry; Safari, an O'Reilly Media Company، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2021. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Java on the Raspberry Pi : Develop Java Programs to Control Devices for Robotics, IoT, and Beyond» در دستهٔ بدون دسته‌بندی قرار دارد.

Use Java to do whatever you want to do with the Raspberry Pi and the devices you need for your project. In theory, it should be possible, and even easy, to work with on the Pi. Unfortunately, reality is a bit different. This book features an extensive set of techniques that allow you to get close to bringing this theory to fruition. You'll review some limitations on using Java imposed by the Raspberry Pi and Raspberry Pi OS, and even Java itself, and examine which ones might apply to your projects and your devices. You'll also explore solutions to address the limitations and l look at efficient development of Java for the Raspberry Pi. Java on the Raspberry Pi shows how to interact with a range of devices useful in robotics and IOT, overcoming the hurdles in doing so. It also covers off-loading work from the Raspberry Pi to an Arduino, leveraging its close-to-real time capabilities. What You'll Learn Develop with Java remotely using NetBeans Leverage available libraries to enable device interaction, and what to do if they don’t work Implement multi-processing, using an Arduino as a co-processor Build sophisticated projects with multiple threads of execution, multiple processes, and even multiple systems Who This Book Is For Experienced programmers who appreciate the benefits of Java and world class tools for application development and want to build robotics or IOT projects using the low cost, low power, and portability of the Raspberry Pi. Table of Contents About the Author About the Technical Reviewer Acknowledgments Chapter 1: Motivations Why the Raspberry Pi? The “Best” Raspberry Pi for Robotics The “Best” Raspberry Pi for IoT Why Java? Programmer Productivity Object-Oriented Programming (OOP) Safety Write Once, Run Anywhere Libraries Limitations Performance Industry Acceptance The Verdict Why Remote Development Using NetBeans? Why NetBeans? Summary Chapter 2: Raspberry Pi 3 Model B+ Setup Setup Considerations Choose the Operating System Load Raspberry Pi OS on the microSD Card Get Raspberry Pi OS Image Raspberry Pi OS Boot and Configure Raspberry Pi OS Initial Configuration Configure Remote Computing Configure the Interface Capabilities Install Java on Raspberry Pi OS What Java to Install? Check for Prior Java Installations Install the JDK 11 Finish Java Installation Finish Pi3 Setup Summary Chapter 3: Raspberry Pi Zero W Setup Setup Considerations Choose the Operating System Load Raspberry Pi OS on the microSD Card Write Raspberry Pi OS Finish the Bootable microSD Card Boot and Configure Raspberry Pi OS Find the IP Address Connect to the Zero Update and Upgrade Raspberry Pi OS Additional Configuration Configure the Interface Capabilities Install Java on Raspberry Pi OS What Java to Install? Check for Prior Java Installations Install the JDK 11 Summary Chapter 4: Set Up the Workstation Remote Computing with SSH Remote Computing with VNC Start the VNC Server Get and Start the VNC Viewer Tune the VNC Server Change the Cursor Changing the Desktop Size Summary Chapter 5: Remote Java Development with NetBeans Choose NetBeans and Java Versions Install Java 11 Install NetBeans 12.0 Test the NetBeans Installation Configure the Raspberry Pi As a Remote Platform Test Remote Development Debug Remotely Fix Remote Debug Successful Debug Examine Variables While Debugging The Debugger Menu Run on the Raspberry Pi Without NetBeans Leverage NetBeans in Complex Projects Create and Test Libraries Use Libraries Choose Which Program to Run from NetBeans Run the Chosen Program on the Raspberry Pi Without NetBeans Just Download with NetBeans Summary Chapter 6: Device Support in Java Find Base I/O Libraries for Java Select the Best Base I/O Library Functional Coverage Performance Support Ease of Use The Base I/O Choice for This Book A Look at pigpioj A Look at diozero Evaluating the Choices Functional Coverage Performance Support Ease of Use The Final Choice – diozero Configure diozero in NetBeans Find (and Port) Device Libraries Java Device Library and diozero Base I/O Java Device Library and Non-diozero Base I/O C/C++ Device Library Python Device Library No Device Library Summary Chapter 7: The diozero Base I/O API diozero Utilities Connect Devices to a Raspberry Pi diozero SerialDevice Background on Raspberry Pi Serial I/O Constructors Read and Write Methods Support for Device Identity diozero I2CDevice Background on Raspberry Pi I2C Constructors Read and Write Methods diozero SpiDevice Background on Raspberry Pi SPI Constructors Read and Write Methods GPIO Background on Raspberry Pi GPIO Pin Numbering Pull-up and Pull-down Current Limits diozero GPIO Classes DigitalInputDevice Constructors Methods DigitalOutputDevice Constructors Methods PwmOutputDevice Constructors Methods Device Library and Application Structure RuntimeIOException Safety Nets try-with-resources Safety Net diozero Shutdown Safety Net Java Shutdown Safety Net Automatic Safety Net Safety Net Guidelines Summary Chapter 8: A DC Motor Controller Choose the Device Understand the Device Find a Device Library Search for Java Libraries Search for Non-Java Libraries A Look at the C# Library A Look at the C++ Library A Look at the Python Library And the Answer Is ... Porting Issues Device Library Interface Device Instances Verbatim vs. Cleansing Port Porting Approach Play with the Device Device Library Development RoboClaw Class Constructor Analysis and Implementation Identity Serial Characteristics Additional Considerations Mid-level Methods Analysis CRC-Related Methods Low-Level Methods Analysis Mid-level Methods Implementation write_n read_n Finish the Core Test the Core Identity Verification TestRoboClawCore Implementation Complete the Implementation Summary Chapter 9: An Inertial Measurement Unit Understand the Device Find a Device Library A Search for Java Libraries A Search for Non-Java Libraries A Look at the C++ Libraries A Look at the C Libraries And the Answer Is ... Device Library Port Play with the Device (FXAS21002C) Device Library Development (FXAS21002C) Constructor Analysis and Implementation Configuration Read a Sample Naming Status Units Implementation Test the Core Additional Thoughts Get Z Axis Status Events After All ... Address Zero Offset and Noise Zero Offset Noise Get Real What Next? Device Library Development (FXOS8700CQ) Constructor Analysis and Implementation Configuration Read Sample and Status Test the Core Events Again What Next? Summary Chapter 10: A Lidar Unit Understand the Device Find a Device Library Device Library Design Interface Common Methods Other Considerations Play with the Device Device Library Development Development Approach Lidar Core Interface-Level and Mid-Level Methods Constructor Identity Serial Characteristics Implementation Test the Core Identity Verification TestLidarCore Implementation Additional Methods Test the Additional Methods Additional Thoughts Long-Running Tasks Read Performance Raw Range What Next? Summary Chapter 11: An Environmental Sensor Understand the Device Find a Device Library Use the diozero BME280 Play with I2C and SPI To the Datasheet I2CDevice SpiDevice A Step Beyond Play Summary Chapter 12: An Analog-to-Digital Converter Understand the Device Finding a Device Library Use the diozero McpAdc Play with SPI Turn Play into Reality Summary Chapter 13: A Stepper Motor Driver Understand the Device Find a Device Library Search for Non-Java Libraries And the Answer Is ... Device Library Design Interface Design Device Library Development Play with the Device SilentStepStick Implementation Constructor Implementation Test SilentStepStick What Next? Speed Profiles Summary Chapter 14: A Project The Metronome Mechanical Design Electronic Design Software Design Project Component Testing Test waitForActive Test whenActivated Test addListener Metronome Development Go Beyond Initial Requirements Get Closer to the Real World Summary Appendix A1: Arduino Command Server Some Arduino Background Choose an Arduino The Command Server Pattern The command_server Sketch command_server File cmd_executor.h File cmd_executor file Test the Command Server The Command Server As a “Device” Test the “Device” from Raspberry Pi Summary Appendix A2: Custom Lidar Unit The Hardware Design Some Harsh Reality The Lidar Unit Sketch cmd_executor.h cmd_executor lidar.h lidar servo.h servo Test Lidar Unit “Datasheet” Power Interface Summary Appendix A3: NetBeans and Maven Create a NetBeans Project Using Maven and diozero Develop a Device Library Test the Device Library Run TestLED with a diozero Remote Provider Run TestLED on a Raspberry Pi Build a Single JAR File Copy the JAR File to the Raspberry Pi Run TestLED on the Raspberry Pi Automate Build, Download, Run Summary Index Use Java to do whatever you want to do with the Raspberry Pi and the devices you need for your project. In theory, it should be possible, and even easy, to work with on the Pi. Unfortunately, reality is a bit different. This book features an extensive set of techniques that allow you to get close to bringing this theory to fruition. You'll review some limitations on using Java imposed by the Raspberry Pi and Raspberry Pi OS, and even Java itself, and examine which ones might apply to your projects and your devices. You'll also explore solutions to address the limitations and l look at efficient development of Java for the Raspberry Pi. Java on the Raspberry Pi shows how to interact with a range of devices useful in robotics and IOT, overcoming the hurdles in doing so. It also covers off-loading work from the Raspberry Pi to an Arduino, leveraging its close-to-real time capabilities. You will: Develop with Java remotely using NetBeans Leverage available libraries to enable device interaction, and what to do if they don't work Implement multi-processing, using an Arduino as a co-processor Build sophisticated projects with multiple threads of execution, multiple processes, and even multiple systems
دانلود کتاب Java on the Raspberry Pi : Develop Java Programs to Control Devices for Robotics, IoT, and Beyond