SlideShare a Scribd company logo
1 of 21
1
Confidential
2
Confidential
Raspberry Pi Platform for Java
Programmers
Dmytro Ihnatiev
Raspberry Pi Platform for Java Programmers
29.04.2021
3
3
Confidential
Raspberry Pi general overview
4
Confidential
What is Raspberry Pi
• Single Board Computer
• Linux Operating system -
Raspbian
• ARM Architecture
• Low Cost
• Low Power
• Has the ability to interact with
the outside world GPIO (used
in a wide array of digital maker
projects, from music machines
and parent detectors to
weather stations and tweeting
birdhouses with infra-red
cameras, etc.)
5
Confidential
Raspberry Pi other models
Raspberry Pi Pico Raspberry Pi 400 unit
6
Confidential
Finding Compatible Hardware
• Zillions of devices available
• Search Amazon, Adafruit for
Raspberry Pi devices
• 3.3V or 5V, I2C, GPIO, Serial
• “Hats” can be used to expand
capability by stacking boards
7
Confidential
Ground Pin, Power Pin, GPIO what is it?
The Raspberry Pi 4 board has a GPIO header with 40 pins (amount could be different from
model to model).
Ground Pins
The ground is very useful for making a common reference between all components in your
circuit. Always remember to connect all components to the ground.
Power Pins
Those pins can be used to power components such as sensors or small actuators.
GPIO
GPIO means General Purpose Input/Output. Basically that’s one pin you can use to write data to
external components (output), or read data from external components (input).
8
Confidential
Pin numbering example (Pinout)
9
9
Confidential
Java (Pi4J) for Raspberry Pi
10
Confidential
What is Pi4J?
• Open Source Project
• Raspberry Pi Platform (Linux/ARM)
• Abstraction over Low Level I/O
• Supports I/O Programming
• Object-oriented API
• Event Based
• Java / C (JNI + Native)
• Provides Listeners , Triggers & Component API
• Provides Java Classes supporting I/O Operations
11
Confidential
Brief history of Pi4J
The Pi4J Project was started in 2012, the same year the Raspberry Pi was introduced as a tool to
provide Java developers a simple and familiar object-oriented interface library to access the low-level
I/O capabilities of the Raspberry Pi including GPIO, I2C, SPI, PWM and Serial communications.
12
Confidential
Version 1.4 of Pi4J
The original library which started in 2012 and got a last release in 2021. Up till version 1.3 the
library targets Java 8, while version 1.4 relies on Java 11.
Main features:
• Export & unexport GPIO pins
• Configure GPIO pin direction
• Configure GPIO pin edge detection
• Control/write GPIO pin states
• Pulse GPIO pin state
• Read GPIO pin states
• Listen for GPIO pin state changes (interrupt-based;
not polling)
• Automatically set GPIO states on program
termination (GPIO shutdown)
• Triggers for automation based on pin state changes
• Send & receive data via RS232 serial communication
• I2C Communication
• SPI Communication
• Extensible GPIO Provider interface to add GPIO
capacity via expansion boards
• Access system information and network information
from the Raspberry Pi
• Wrapper classes for direct access to WiringPi Library
from Java
13
Confidential
Version 2 of Pi4J
As of Version 2.0, Pi4J will no longer include support for peripheral devices and add-on
chipsets/boards as part of the core project. A new plugin model has been introduced in version
2.0 that should help enable third-party development and support third-party add-ons which may
be developed and maintained independently of the core Pi4J project.
Main features:
• Fluent APIs/Interfaces
• Immutable Runtime Context
• Extensible Provider/Platform/Plug-in
Architecture
• Builder-patterns for creating new I/O
instances
• Dependency Injection via Pi4J Annotations
• Well-documented source code
• Hardware PWM Support
• Remote I/O Support (via TCP/IP)
• Java 11
• In addition to the features listed above, Pi4J
version 2.0 also abandons the old WiringPi
pin numbering scheme in favor of the more
traditional and commonly used Broadcom
pin numbering scheme.
14
Confidential
Version 2 of Pi4J
As of Version 2.0, Pi4J will no longer include support for peripheral devices and add-on
chipsets/boards as part of the core project. A new plugin model has been introduced in version
2.0 that should help enable third-party development and support third-party add-ons which may
be developed and maintained independently of the core Pi4J project.
Main features:
• Fluent APIs/Interfaces
• Immutable Runtime Context
• Extensible Provider/Platform/Plug-in
Architecture
• Builder-patterns for creating new I/O
instances
• Dependency Injection via Pi4J Annotations
• Well-documented source code
• Hardware PWM Support
• Remote I/O Support (via TCP/IP)
• Java 11
• In addition to the features listed above, Pi4J
version 2.0 also abandons the old WiringPi
pin numbering scheme in favor of the more
traditional and commonly used Broadcom
pin numbering scheme.
15
Confidential
GPIO Programming with Pi4J
• Hardware Pins to Motorola Broadcom chipset numbering
• Physical pin locations can change between board revisions
• Pi4J can use Broadcom or WiringPi numbering schemes
• Input or Output Pins
• High (3.3 VDC) or Low (0 VDC) States
• Outputs used to control things like relays, lights, motors, bells, etc.
• Pullup and Pulldown resistors
16
Confidential
Main design classes (Pi4J 1.4)
• Listeners. Provides the ability to react on
events from triggers
• Triggers. Create an event on state
change
• Components (Deprecated in Pi4J 2.0)
Other Components
• Pull up and Pull down Resistors
• Toggle output and handy methods to access
pins and change their states
17
Confidential
Pull up and Pull Down resistors
The pull-down resistor pulls the voltage
down to zero. If the pull-up switch is pressed,
it pulls the voltage up to whatever the +
supply is.
The pull-up resistor pulls the voltage up to
whatever the + supply is. If the pull-down
switch is pressed, it pulls the voltage down to
zero.
18
Confidential
GPIO Output Circuit Example
GpioController gpio = GpioFactory.getInstance();
GpioPinDigitalOutput output =
gpio.provisionDigitalOutputPin(RaspiPin.GPIO_12,
PinState.LOW);
output.high(); // set to high state
output.low(); // set to low state
output.toggle(); // switch to other state
output.pulse(1000); // set state for a duration
19
Confidential
GPIO Input Circuit Example
GpioController gpio = GpioFactory.getInstance();
GpioPinDigitalInput input = gpio.provisionDigitalInputPin(RaspiPin.GPIO_02,
PinPullResistance.PULL_DOWN);
input.addListener((GpioPinListenerDigital) (GpioPinDigitalStateChangeEvent
event) -> {
System.out.println(
"State = " + event.getState() +
", Edge = " + event.getEdge() +
", Pin = " + event.getPin() +
", Pressed = " + input.isHigh()
);
} );
20
Confidential
Resources
• Pi4J - https://pi4j.com/1.2/index.html
• GitHub Pi4J - https://github.com/Pi4J/pi4j
• Pi4J 2.0 - https://pi4j.com/
• GPIO - https://www.raspberrypi.org/documentation/usage/gpio/README.md
• WiringPi - http://wiringpi.com/
• Extensive support for many devices for many languages -
https://github.com/ControlEverythingCom
• Hardware Vendors (SeeedStudio Grove, Adafruit – Provides Python code for
most of their hardware, Texas Instruments (sold by Mouser, DigiKey, etc.)
• Pi Starter and Learning Kit Vendors (CanaKit, Adeept, etc.)
21
Confidential

More Related Content

What's hot

Isn’t it Ironic that a Redfish is software defining you
Isn’t it Ironic that a Redfish is software defining you Isn’t it Ironic that a Redfish is software defining you
Isn’t it Ironic that a Redfish is software defining you Bruno Cornec
 
BKK16-212: What's broken on ARM64?
BKK16-212: What's broken on ARM64?BKK16-212: What's broken on ARM64?
BKK16-212: What's broken on ARM64?Linaro
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 3
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 3Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 3
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 3Qualcomm Developer Network
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceTim Ellison
 
FEL 12 Release Notes
FEL 12 Release NotesFEL 12 Release Notes
FEL 12 Release Noteschitlesh
 
Alfresco Day Vienna 2015 - Technical Track - Developer Platform Updates
Alfresco Day Vienna 2015 - Technical Track - Developer Platform UpdatesAlfresco Day Vienna 2015 - Technical Track - Developer Platform Updates
Alfresco Day Vienna 2015 - Technical Track - Developer Platform UpdatesAlfresco Software
 
Splunk Modular Inputs / JMS Messaging Module Input
Splunk Modular Inputs / JMS Messaging Module InputSplunk Modular Inputs / JMS Messaging Module Input
Splunk Modular Inputs / JMS Messaging Module InputDamien Dallimore
 
Oracle Linux Nov 2011 Webcast
Oracle Linux Nov 2011 WebcastOracle Linux Nov 2011 Webcast
Oracle Linux Nov 2011 WebcastTerry Wang
 
BKK16-301A Expanding the Enterprise Landscape in Centos
BKK16-301A Expanding the Enterprise Landscape in CentosBKK16-301A Expanding the Enterprise Landscape in Centos
BKK16-301A Expanding the Enterprise Landscape in CentosLinaro
 
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)Fraser Chadburn
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Shaun Smith
 
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)My own sweet home!
 
Mavenizing your Liferay project
Mavenizing your Liferay projectMavenizing your Liferay project
Mavenizing your Liferay projectmimacom
 
Deep Learning for Java Developer - Getting Started
Deep Learning for Java Developer - Getting StartedDeep Learning for Java Developer - Getting Started
Deep Learning for Java Developer - Getting StartedSuyash Joshi
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileC4Media
 
Os Koziarsky
Os KoziarskyOs Koziarsky
Os Koziarskyoscon2007
 

What's hot (20)

OpenDaylight nluug_november
OpenDaylight nluug_novemberOpenDaylight nluug_november
OpenDaylight nluug_november
 
Isn’t it Ironic that a Redfish is software defining you
Isn’t it Ironic that a Redfish is software defining you Isn’t it Ironic that a Redfish is software defining you
Isn’t it Ironic that a Redfish is software defining you
 
BKK16-212: What's broken on ARM64?
BKK16-212: What's broken on ARM64?BKK16-212: What's broken on ARM64?
BKK16-212: What's broken on ARM64?
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 3
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 3Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 3
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 3
 
Os Lattner
Os LattnerOs Lattner
Os Lattner
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark Performance
 
FEL 12 Release Notes
FEL 12 Release NotesFEL 12 Release Notes
FEL 12 Release Notes
 
Os Rego
Os RegoOs Rego
Os Rego
 
Alfresco Day Vienna 2015 - Technical Track - Developer Platform Updates
Alfresco Day Vienna 2015 - Technical Track - Developer Platform UpdatesAlfresco Day Vienna 2015 - Technical Track - Developer Platform Updates
Alfresco Day Vienna 2015 - Technical Track - Developer Platform Updates
 
Splunk Modular Inputs / JMS Messaging Module Input
Splunk Modular Inputs / JMS Messaging Module InputSplunk Modular Inputs / JMS Messaging Module Input
Splunk Modular Inputs / JMS Messaging Module Input
 
Oracle Linux Nov 2011 Webcast
Oracle Linux Nov 2011 WebcastOracle Linux Nov 2011 Webcast
Oracle Linux Nov 2011 Webcast
 
BKK16-301A Expanding the Enterprise Landscape in Centos
BKK16-301A Expanding the Enterprise Landscape in CentosBKK16-301A Expanding the Enterprise Landscape in Centos
BKK16-301A Expanding the Enterprise Landscape in Centos
 
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
 
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
 
Mavenizing your Liferay project
Mavenizing your Liferay projectMavenizing your Liferay project
Mavenizing your Liferay project
 
Deep Learning for Java Developer - Getting Started
Deep Learning for Java Developer - Getting StartedDeep Learning for Java Developer - Getting Started
Deep Learning for Java Developer - Getting Started
 
Yocto - 7 masters
Yocto - 7 mastersYocto - 7 masters
Yocto - 7 masters
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy Mobile
 
Os Koziarsky
Os KoziarskyOs Koziarsky
Os Koziarsky
 

Similar to Java Webinar #9: “Raspberry Pi Platform for Java Programmers”

IoT Physical Devices and End Points.pdf
IoT Physical Devices and End Points.pdfIoT Physical Devices and End Points.pdf
IoT Physical Devices and End Points.pdfGVNSK Sravya
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxMadhurimaDas52
 
Building the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiNeil Broers
 
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)Mr.Nukoon Phimsen
 
Got Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOGot Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOAdam Englander
 
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)savageautomate
 
Up and running with Raspberry Pi
Up and running with Raspberry PiUp and running with Raspberry Pi
Up and running with Raspberry PiShahed Mehbub
 
Raspberry pi technical documentation
Raspberry pi technical documentationRaspberry pi technical documentation
Raspberry pi technical documentationGR Techno Solutions
 
Internet of Things With PHP
Internet of Things With PHPInternet of Things With PHP
Internet of Things With PHPAdam Englander
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptxBLACKSPAROW
 
RaspberryPi.pptx
RaspberryPi.pptxRaspberryPi.pptx
RaspberryPi.pptxPheo25
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi IntroductionMichal Sedlak
 
Raspberry pi pico projects raspberry pi projects
Raspberry pi pico projects raspberry pi projectsRaspberry pi pico projects raspberry pi projects
Raspberry pi pico projects raspberry pi projectsIsmailkhan77481
 
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdfJayanthi Kannan MK
 
Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlPradip Bhandari
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionIntel® Software
 

Similar to Java Webinar #9: “Raspberry Pi Platform for Java Programmers” (20)

Unit 3 Complete.pptx
Unit 3 Complete.pptxUnit 3 Complete.pptx
Unit 3 Complete.pptx
 
IoT Physical Devices and End Points.pdf
IoT Physical Devices and End Points.pdfIoT Physical Devices and End Points.pdf
IoT Physical Devices and End Points.pdf
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptx
 
Building the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry Pi
 
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
 
Got Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOGot Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIO
 
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)
 
Up and running with Raspberry Pi
Up and running with Raspberry PiUp and running with Raspberry Pi
Up and running with Raspberry Pi
 
IoT: LoRa and Java on the PI
IoT: LoRa and Java on the PIIoT: LoRa and Java on the PI
IoT: LoRa and Java on the PI
 
Raspberry pi technical documentation
Raspberry pi technical documentationRaspberry pi technical documentation
Raspberry pi technical documentation
 
Internet of Things With PHP
Internet of Things With PHPInternet of Things With PHP
Internet of Things With PHP
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptx
 
Raspberry pi and pi4j
Raspberry pi and pi4jRaspberry pi and pi4j
Raspberry pi and pi4j
 
RaspberryPi.pptx
RaspberryPi.pptxRaspberryPi.pptx
RaspberryPi.pptx
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi Introduction
 
Raspberry pi pico projects raspberry pi projects
Raspberry pi pico projects raspberry pi projectsRaspberry pi pico projects raspberry pi projects
Raspberry pi pico projects raspberry pi projects
 
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
5 IOT MODULE 5 RaspberryPi Programming using Python.pdf
 
Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin Control
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT Edition
 

More from GlobalLogic Ukraine

GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”GlobalLogic Ukraine
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptxШтучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptxGlobalLogic Ukraine
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptxЗадачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptxGlobalLogic Ukraine
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptxЩо треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptxGlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...GlobalLogic Ukraine
 
JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"GlobalLogic Ukraine
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...GlobalLogic Ukraine
 
Страх і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic EducationСтрах і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic EducationGlobalLogic Ukraine
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”GlobalLogic Ukraine
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”GlobalLogic Ukraine
 
“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...GlobalLogic Ukraine
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”GlobalLogic Ukraine
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"GlobalLogic Ukraine
 
GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"GlobalLogic Ukraine
 
C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"GlobalLogic Ukraine
 
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...GlobalLogic Ukraine
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Ukraine
 
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”GlobalLogic Ukraine
 

More from GlobalLogic Ukraine (20)

GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptxШтучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptx
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptxЗадачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptx
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptxЩо треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
 
JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
 
Страх і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic EducationСтрах і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic Education
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
 
“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
 
GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"
 
C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"
 
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
 
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
GlobalLogic Azure TechTalk ONLINE “Marketing Data Lake in Azure”
 

Recently uploaded

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Java Webinar #9: “Raspberry Pi Platform for Java Programmers”

  • 2. 2 Confidential Raspberry Pi Platform for Java Programmers Dmytro Ihnatiev Raspberry Pi Platform for Java Programmers 29.04.2021
  • 4. 4 Confidential What is Raspberry Pi • Single Board Computer • Linux Operating system - Raspbian • ARM Architecture • Low Cost • Low Power • Has the ability to interact with the outside world GPIO (used in a wide array of digital maker projects, from music machines and parent detectors to weather stations and tweeting birdhouses with infra-red cameras, etc.)
  • 5. 5 Confidential Raspberry Pi other models Raspberry Pi Pico Raspberry Pi 400 unit
  • 6. 6 Confidential Finding Compatible Hardware • Zillions of devices available • Search Amazon, Adafruit for Raspberry Pi devices • 3.3V or 5V, I2C, GPIO, Serial • “Hats” can be used to expand capability by stacking boards
  • 7. 7 Confidential Ground Pin, Power Pin, GPIO what is it? The Raspberry Pi 4 board has a GPIO header with 40 pins (amount could be different from model to model). Ground Pins The ground is very useful for making a common reference between all components in your circuit. Always remember to connect all components to the ground. Power Pins Those pins can be used to power components such as sensors or small actuators. GPIO GPIO means General Purpose Input/Output. Basically that’s one pin you can use to write data to external components (output), or read data from external components (input).
  • 10. 10 Confidential What is Pi4J? • Open Source Project • Raspberry Pi Platform (Linux/ARM) • Abstraction over Low Level I/O • Supports I/O Programming • Object-oriented API • Event Based • Java / C (JNI + Native) • Provides Listeners , Triggers & Component API • Provides Java Classes supporting I/O Operations
  • 11. 11 Confidential Brief history of Pi4J The Pi4J Project was started in 2012, the same year the Raspberry Pi was introduced as a tool to provide Java developers a simple and familiar object-oriented interface library to access the low-level I/O capabilities of the Raspberry Pi including GPIO, I2C, SPI, PWM and Serial communications.
  • 12. 12 Confidential Version 1.4 of Pi4J The original library which started in 2012 and got a last release in 2021. Up till version 1.3 the library targets Java 8, while version 1.4 relies on Java 11. Main features: • Export & unexport GPIO pins • Configure GPIO pin direction • Configure GPIO pin edge detection • Control/write GPIO pin states • Pulse GPIO pin state • Read GPIO pin states • Listen for GPIO pin state changes (interrupt-based; not polling) • Automatically set GPIO states on program termination (GPIO shutdown) • Triggers for automation based on pin state changes • Send & receive data via RS232 serial communication • I2C Communication • SPI Communication • Extensible GPIO Provider interface to add GPIO capacity via expansion boards • Access system information and network information from the Raspberry Pi • Wrapper classes for direct access to WiringPi Library from Java
  • 13. 13 Confidential Version 2 of Pi4J As of Version 2.0, Pi4J will no longer include support for peripheral devices and add-on chipsets/boards as part of the core project. A new plugin model has been introduced in version 2.0 that should help enable third-party development and support third-party add-ons which may be developed and maintained independently of the core Pi4J project. Main features: • Fluent APIs/Interfaces • Immutable Runtime Context • Extensible Provider/Platform/Plug-in Architecture • Builder-patterns for creating new I/O instances • Dependency Injection via Pi4J Annotations • Well-documented source code • Hardware PWM Support • Remote I/O Support (via TCP/IP) • Java 11 • In addition to the features listed above, Pi4J version 2.0 also abandons the old WiringPi pin numbering scheme in favor of the more traditional and commonly used Broadcom pin numbering scheme.
  • 14. 14 Confidential Version 2 of Pi4J As of Version 2.0, Pi4J will no longer include support for peripheral devices and add-on chipsets/boards as part of the core project. A new plugin model has been introduced in version 2.0 that should help enable third-party development and support third-party add-ons which may be developed and maintained independently of the core Pi4J project. Main features: • Fluent APIs/Interfaces • Immutable Runtime Context • Extensible Provider/Platform/Plug-in Architecture • Builder-patterns for creating new I/O instances • Dependency Injection via Pi4J Annotations • Well-documented source code • Hardware PWM Support • Remote I/O Support (via TCP/IP) • Java 11 • In addition to the features listed above, Pi4J version 2.0 also abandons the old WiringPi pin numbering scheme in favor of the more traditional and commonly used Broadcom pin numbering scheme.
  • 15. 15 Confidential GPIO Programming with Pi4J • Hardware Pins to Motorola Broadcom chipset numbering • Physical pin locations can change between board revisions • Pi4J can use Broadcom or WiringPi numbering schemes • Input or Output Pins • High (3.3 VDC) or Low (0 VDC) States • Outputs used to control things like relays, lights, motors, bells, etc. • Pullup and Pulldown resistors
  • 16. 16 Confidential Main design classes (Pi4J 1.4) • Listeners. Provides the ability to react on events from triggers • Triggers. Create an event on state change • Components (Deprecated in Pi4J 2.0) Other Components • Pull up and Pull down Resistors • Toggle output and handy methods to access pins and change their states
  • 17. 17 Confidential Pull up and Pull Down resistors The pull-down resistor pulls the voltage down to zero. If the pull-up switch is pressed, it pulls the voltage up to whatever the + supply is. The pull-up resistor pulls the voltage up to whatever the + supply is. If the pull-down switch is pressed, it pulls the voltage down to zero.
  • 18. 18 Confidential GPIO Output Circuit Example GpioController gpio = GpioFactory.getInstance(); GpioPinDigitalOutput output = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_12, PinState.LOW); output.high(); // set to high state output.low(); // set to low state output.toggle(); // switch to other state output.pulse(1000); // set state for a duration
  • 19. 19 Confidential GPIO Input Circuit Example GpioController gpio = GpioFactory.getInstance(); GpioPinDigitalInput input = gpio.provisionDigitalInputPin(RaspiPin.GPIO_02, PinPullResistance.PULL_DOWN); input.addListener((GpioPinListenerDigital) (GpioPinDigitalStateChangeEvent event) -> { System.out.println( "State = " + event.getState() + ", Edge = " + event.getEdge() + ", Pin = " + event.getPin() + ", Pressed = " + input.isHigh() ); } );
  • 20. 20 Confidential Resources • Pi4J - https://pi4j.com/1.2/index.html • GitHub Pi4J - https://github.com/Pi4J/pi4j • Pi4J 2.0 - https://pi4j.com/ • GPIO - https://www.raspberrypi.org/documentation/usage/gpio/README.md • WiringPi - http://wiringpi.com/ • Extensive support for many devices for many languages - https://github.com/ControlEverythingCom • Hardware Vendors (SeeedStudio Grove, Adafruit – Provides Python code for most of their hardware, Texas Instruments (sold by Mouser, DigiKey, etc.) • Pi Starter and Learning Kit Vendors (CanaKit, Adeept, etc.)