SlideShare una empresa de Scribd logo
1 de 52
Java Native GPIO Operations
Using Device I/O API
About me…
@jeffprestes
Developer Advocate
Java, PHP, JavaScript Developer
Agenda
 What is not IoT
 What is IoT
 Polymath required skills
 Small history of RaspberryPi
 RaspberryPi Components and slots
 Raspbian – a Debian/Linux to RasberryPi
 Java support to SOC devices
 Java Device I/O
 Lab
 Configure WiFi network (static / dhcp / resolv.conf)
 Upgrade the Raspbian
 Install WiringPi
 Install Java for Embedded devices
This is not IoT… (IMHO)
This is so cool but this is Eletronic!!
And this is not new…
(who has gray hair can say… P)
What is IoT?
Internet
Million of Web
Services
(PayPal, Twitter,
Google, Netflix,
Facebook)
Things
Billions of sensors,
motors, displays,
appliances, toys,
cars, stores, robots
+
And to work with IoT you’re going
to need more skills
You’re going to need to a Polimath
A polymath (Greek: πολυμαθής, polymathēs,
"having learned much")[1] is a person whose
expertise spans a significant number of different
subject areas; such a person is known to draw
on complex bodies of knowledge to solve
specific problems. The term was first used in the
seventeenth century; the related term,
polyhistor, is an ancient term with similar
meaning.
(Source: Wikipedia - http://en.wikipedia.org/wiki/Polymath)
Italian Polymath. What was da Vinci? Scientist?
Engineer? Mathematic? Painter? Sculptor? Musician?
Botanic? Anatomist?
Source: Wikipedia - http://en.wikipedia.org/wiki/Leonardo_da_Vinci
Server Side
Eletronic
(sometimes mechanic
and sculptor on wood or iron)
Client/Desktop
Mobile
(Beacons e Weareables)
Operation Systems
History
 Designed in UK, University of
Cambridge, 2006, to be a chip alternative
to computers to students. Also a way to
students rediscover how cool is to work
with Robotic.
It has been projected to educational
purposes but can used in Commercial
ones too.
 Team that have concepted it: Eben Upton, Rob Mullins, Jack Lang and Alan Mycroft
 Raspberry Pi Foundation was created and first alpha boards were tested, 2011
 Sells begins April, 2012
 Model B+ is released in November, 2012
 More than 5 Million already have been sold
Raspbian is an unofficial port of Debian Wheezy armhf with compilation settings
adjusted to produce optimized "hard float" code that will run on the Raspberry Pi.
Note: Raspbian is not affiliated with the Raspberry Pi Foundation. Raspbian was created by a small,
dedicated team of developers that are fans of the Raspberry Pi hardware, the educational goals of the
Raspberry Pi Foundation and, of course, the Debian Project.
Best OS to Raspberry Pi nowadays. If you use Ubuntu, you’re going to feeling in
home. All basic Unix commands works on it and almost all basic server-side too:
Apache, Nginx, PHP, Java, Python, MySQL
Default user: pi / Default password: raspberry
And never forget: sudo apt-get install and be happy :D
To install it in your MicroSD card (Recommend 8Gb or more)
http://www.raspberrypi.org/documentation/installation/installing-images
JDK SE for
Embbeded Devices
Since JDK 7, Java SE SDK for Desktop was ported to ARM chips and
JDK 8 is already available.
As Raspberry Pi is based in a ARM chip and runs over a Linux
distribution you’re able to use Java SE
You can run your favorite Java Application Server or create JavaFX
applications
(you don’t need to learn JME or Python anymore :D!)
Device I/O API
Originally part of Java ME library, The Device I/O project is an open source,
Java-level API for accessing generic device peripherals on embedded
devices based on JavaSE. It’s under OpenJDK project.
https://wiki.openjdk.java.net/display/dio/Main
http://docs.oracle.com/javame/8.0/api/dio/api/index.html
Differences between
Device I/O and PI4J
PI4J is an excellent API, however it’s only for RaspberryPi if you would
need to run your APP into a BeagleBone board will have to rewrite all
GPIO access code.
Device I/O, as other Java API, brings abstraction layer over GPIO access
functionallity saving your time and complexity. Write once run anywhere :D
Differences between
Device I/O and PI4J
Also, GPIO map is different in two APIs, check:
Device I/O PI4J
http://docs.oracle.com/javame/8.0/get-started-rpi/piportsapdx.htm
http://pi4j.com/pins/model-b-plus.html
Device I/O API
Device I/O has a configuration file for each board
The Raspberry PI file is
dio.properties-raspberrypi
It has definitions for each GPIO ports
Thus Device I/O can works with different SoC Computers
Device I/O API
Device I/O requires special JDK permissions to access GPIO
Device I/O comes with gpio.policy file
You can map each Pin you’re planning to use or only:
grant {
permission jdk.dio.gpio.GPIOPinPermission "*:*";
permission jdk.dio.DeviceMgmtPermission "*:*", "open";
};
(okay, don’t do this in production kids)
Thanks.
Jeff Prestes
@jeffprestes
Slideshare.com/jeffprestes
Github.com/jeffprestes
@paypaldev
developer.paypal.com
developers.braintreepayments.com
Configure your wifi credentials:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
(file content below)
network={
ssid="iPhone"
psk="43070720"
}
network={
ssid=”<<your-wifi-name-here>>"
psk=”<<your-wifi-password>>"
}
network={
ssid="BoxNet"
psk="hackkitty"
}
Configure your wifi network using static IP:
sudo nano /etc/network/interfaces
(file content below)
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.20.218
netmask 255.255.255.0
gateway 192.168.20.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet static
Configure your wifi network using DHCP (most used):
sudo nano /etc/network/interfaces
(file content below)
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
sudo apt-get update
sudo apt-get dist-upgrade
//Upgrades Raspbian
sudo reboot
//Use Reboot to restart Raspbian safetly
sudo halt
//Use halt to turn off Raspbian safetly
sudo nano /etc/resolv.conf
(file content below)
nameserver 8.8.8.8
nameserver 8.8.4.4
//Google DNS servers
Configure the DNS Servers
Wiring Pi
It is GPIO Interface library for the Raspberry Pi. It’s written in C for the
BCM2835 used in the Raspberry Pi.
WiringPi includes a command-line utility gpio which can be used to
program and setup the GPIO pins.
Wiring Pi
$ sudo apt-get install git-core
$ git clone git://git.drogon.net/wiringPi
$ cd wiringPi
$ git pull origin
$ ./build
Installation
$ gpio -v
$ gpio readall
Test
Get back to your user home directory
(in this case you’re using pi user, remember?)
$ cd ~/
Downloading
JDK SE 8 for Embedded
I will have to download it from your computer as you will have to accept
Oracle’s terms and conditions.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-arm-downloads-2187472.html
Mac and Linux users: use scp to copy the file
$ scp jdk-<version>-linux-arm-vfp-hflt.gz pi@<your-device-
ip>:/home/pi/jdk-<version>-linux-arm-vfp-hflt.tar.gz
(note that I’ve changed the extention
because the downloaded file came only with .gz extention)
Windows users: use WinSCP to do this
Installing
JDK SE 8 for Embedded
At PI home directory execute:
$ sudo mkdir -p /opt/java
$ sudo chown root:root /opt/java
$ cd /opt/java
$ sudo tar xvzf ~/jdk-<version>-linux-arm-vfp-hflt.tar.gz
Set default java and javac to the new installed JDK.
$ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk-<version>/bin/javac
1
$ sudo update-alternatives --install /usr/bin/java java /opt/jdk-<version>/bin/java 1
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
After all, verify with the commands with -verion option.
$ java -version
$ javac -version
Installing
JDK SE 8 for Embedded
Double check if java version is correct for root too:
$ sudo java -version
$ sudo javac –version
This is important because will you need to run your Java application that access
GPIO with root privileges.
Installing
JDK SE 8 for Embedded
Define JAVA_HOME environment variable:
$ sudo nano /etc/environment
And add to it:
JAVA_HOME="/opt/jdk-<version>"
Do the same in your bash profile
$ nano ~/.bashrc
And add to it:
export JAVA_HOME="/opt/java/jdk-<version>"
export PATH=$PATH:$JAVA_HOME/bin
Installing
Java Device I/O
You’ll need to download and compile the library in your Raspberry PI.
Device I/O like other OpenJDK projects uses Mercurial to manage their source
code. You must install it into your Raspberry PI
$ sudo apt-get install mercurial
Create a directory to store the source code and compile it
$ mkdir deviceio
Download it
$ cd deviceio
$ hg clone http://hg.openjdk.java.net/dio/dev
Installing
Java Device I/O
Let’s compile it:
$ export PI_TOOLS=/usr
$ cd dev
$ make
After this, let’s install your Device I/O files in your JRE
$ cp -r build/deviceio/lib/*
$JAVA_HOME/jre/lib
Now let’s get started to talk about good things…
Our Lab: Create a Candy
Vending Machine
How it works
Our Lab: Create a Candy
Vending Machine
Let’s use Wiring Pi to test the circuits
$ sudo gpio mode 1 output
$ sudo gpio mode 4 output
$ sudo gpio write 1 1
$ sudo gpio write 1 1
$ sudo gpio write 1 0
$ sudo gpio write 1 0
Our Lab: Create a Candy
Vending Machine
Copy the dio.jar compiled in your Raspberry Pi to your machine
$ scp ~/deviceio/dev/build/jar/dio.jar <your-
user>@<yourmachineip>:~/dio.jar
Or use yout WinSCP
Add it your Maven local repository
$ mvn install:install-file -Dfile=~/dio.jar -DgroupId=jdk.dio -
DartifactId=device-io -Dversion=1.0 -Dpackaging=jar -
DgeneratePom=true
Open the Netbeans and at Team->Git->Clone Repository
https://github.com/jeffprestes/candies-client-native-java.git
Our Lab: Create a Candy
Vending Machine
Copy the jar compiled with Dependencies to home’s directory of pi user.
Now it’s time to edit GPIO permissions in gpio.policy file
Copy it to home directory
$ cp ~/deviceio/dev/samples/gpio/gpio.policy ~/gpio.policy
And content must be like this
grant {
// permissions for using GPIO pin 18 GPIOLEDSample
permission jdk.dio.gpio.GPIOPinPermission ":18";
permission jdk.dio.gpio.GPIOPinPermission "0:18";
permission jdk.dio.DeviceMgmtPermission "GPIO18:18", "open";
permission jdk.dio.gpio.GPIOPinPermission ":24";
permission jdk.dio.gpio.GPIOPinPermission "0:24";
permission jdk.dio.DeviceMgmtPermission "GPIO24:24", "open";
};
Our Lab: Create a Candy
Vending Machine
Now, let’s start the machine application
$ sudo java
-Djdk.dio.registry=/home/pi/java/dio/config/dio.properties-raspberrypi
-Djava.security.policy=/home/pi/java/nativegpio/gpio.policy
-jar candies.jar iot.eclipse.org jeffprestes/candies/world machineusa 1883
Where:
iot.eclipse.org is the MQTT server
jeffprestes/candies/world is the queue
machineusa is the client name
1883 is the MQTT broker port
Our Lab: Create a Candy
Vending Machine
Our Lab: Create a Candy
Vending Machine
To buy
Create a Premier account in PayPal Sandbox
developer.paypal.com -> Dashboard -> Sandbox -> Accounts ->
Create Account
Later, goto candies.novatrix.com.br in your mobile phone and
use this user as a buyer
Thanks.
Jeff Prestes
@jeffprestes
Slideshare.com/jeffprestes
Github.com/jeffprestes
@paypaldev
developer.paypal.com
developers.braintreepayments.com

Más contenido relacionado

La actualidad más candente

Raspberry Pi Using Python
Raspberry Pi Using PythonRaspberry Pi Using Python
Raspberry Pi Using PythonSeggy Segaran
 
Getting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and ArduinoGetting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and ArduinoChad Mairn
 
PyCon_India_2017_MicroPython_Ayan
PyCon_India_2017_MicroPython_AyanPyCon_India_2017_MicroPython_Ayan
PyCon_India_2017_MicroPython_AyanAyan Pahwa
 
Con7968 let's get physical - io programming using pi4 j
Con7968   let's get physical - io programming using pi4 jCon7968   let's get physical - io programming using pi4 j
Con7968 let's get physical - io programming using pi4 jsavageautomate
 
Getting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiGetting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiLeon Anavi
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry piHusainBhaldar21
 
Exploring Raspberry Pi
Exploring Raspberry PiExploring Raspberry Pi
Exploring Raspberry PiLentin Joseph
 
Introduction to Raspberry Pi and GPIO
Introduction to Raspberry Pi and GPIOIntroduction to Raspberry Pi and GPIO
Introduction to Raspberry Pi and GPIOKris Findlay
 
Con3187 Creating Industrial Middleware with Java ME and Single-Board Computers
Con3187 Creating Industrial Middleware with Java ME and Single-Board ComputersCon3187 Creating Industrial Middleware with Java ME and Single-Board Computers
Con3187 Creating Industrial Middleware with Java ME and Single-Board ComputersJulio Palma Vázquez
 
Raspberry pi tutorial
Raspberry pi tutorialRaspberry pi tutorial
Raspberry pi tutorialImad Rhali
 
Getting Started with Embedded Python: MicroPython and CircuitPython
Getting Started with Embedded Python: MicroPython and CircuitPythonGetting Started with Embedded Python: MicroPython and CircuitPython
Getting Started with Embedded Python: MicroPython and CircuitPythonAyan Pahwa
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldOmer Kilic
 
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...Raul Chong
 
Raspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 updateRaspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 updateKevin Hooke
 
Java fx on raspberry pi gerrit grunwald
Java fx on raspberry pi   gerrit grunwaldJava fx on raspberry pi   gerrit grunwald
Java fx on raspberry pi gerrit grunwaldNLJUG
 
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi [Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi Tomomi Imura
 
Smart Wireless Surveillance Monitoring using RASPBERRY PI
Smart Wireless Surveillance Monitoring using RASPBERRY PISmart Wireless Surveillance Monitoring using RASPBERRY PI
Smart Wireless Surveillance Monitoring using RASPBERRY PIKrishna Kumar
 
Exploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsExploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsKoan-Sin Tan
 

La actualidad más candente (20)

Raspberry Pi Using Python
Raspberry Pi Using PythonRaspberry Pi Using Python
Raspberry Pi Using Python
 
Pi Is For Python
Pi Is For PythonPi Is For Python
Pi Is For Python
 
Getting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and ArduinoGetting Started with Raspberry Pi and Arduino
Getting Started with Raspberry Pi and Arduino
 
PyCon_India_2017_MicroPython_Ayan
PyCon_India_2017_MicroPython_AyanPyCon_India_2017_MicroPython_Ayan
PyCon_India_2017_MicroPython_Ayan
 
Con7968 let's get physical - io programming using pi4 j
Con7968   let's get physical - io programming using pi4 jCon7968   let's get physical - io programming using pi4 j
Con7968 let's get physical - io programming using pi4 j
 
Getting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry PiGetting started with AGL using a Raspberry Pi
Getting started with AGL using a Raspberry Pi
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry pi
 
Exploring Raspberry Pi
Exploring Raspberry PiExploring Raspberry Pi
Exploring Raspberry Pi
 
Introduction to Raspberry Pi and GPIO
Introduction to Raspberry Pi and GPIOIntroduction to Raspberry Pi and GPIO
Introduction to Raspberry Pi and GPIO
 
Con3187 Creating Industrial Middleware with Java ME and Single-Board Computers
Con3187 Creating Industrial Middleware with Java ME and Single-Board ComputersCon3187 Creating Industrial Middleware with Java ME and Single-Board Computers
Con3187 Creating Industrial Middleware with Java ME and Single-Board Computers
 
Raspberry pi tutorial
Raspberry pi tutorialRaspberry pi tutorial
Raspberry pi tutorial
 
Getting Started with Embedded Python: MicroPython and CircuitPython
Getting Started with Embedded Python: MicroPython and CircuitPythonGetting Started with Embedded Python: MicroPython and CircuitPython
Getting Started with Embedded Python: MicroPython and CircuitPython
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the World
 
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
 
Raspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 updateRaspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 update
 
Java fx on raspberry pi gerrit grunwald
Java fx on raspberry pi   gerrit grunwaldJava fx on raspberry pi   gerrit grunwald
Java fx on raspberry pi gerrit grunwald
 
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi [Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
 
Smart Wireless Surveillance Monitoring using RASPBERRY PI
Smart Wireless Surveillance Monitoring using RASPBERRY PISmart Wireless Surveillance Monitoring using RASPBERRY PI
Smart Wireless Surveillance Monitoring using RASPBERRY PI
 
Meng
MengMeng
Meng
 
Exploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsExploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source Tools
 

Destacado

RaspberryPi + IoT - Lab to switch on and off a light bulb
RaspberryPi + IoT - Lab to switch on and off a light bulbRaspberryPi + IoT - Lab to switch on and off a light bulb
RaspberryPi + IoT - Lab to switch on and off a light bulbJeff Prestes
 
Android Based Robots
Android Based RobotsAndroid Based Robots
Android Based Robotsrobotics25
 
IoT - IT 423 ppt
IoT - IT 423 pptIoT - IT 423 ppt
IoT - IT 423 pptMhae Lyn
 
Chapter 10:Understanding Java Related Platforms and Integration Technologies
Chapter 10:Understanding Java Related Platforms and Integration TechnologiesChapter 10:Understanding Java Related Platforms and Integration Technologies
Chapter 10:Understanding Java Related Platforms and Integration TechnologiesIt Academy
 
J2EE vs JavaEE
J2EE vs JavaEEJ2EE vs JavaEE
J2EE vs JavaEEeanimou
 
Java JSON Parser Comparison
Java JSON Parser ComparisonJava JSON Parser Comparison
Java JSON Parser ComparisonAllan Huang
 
ICT-104 bill acceptor protocol
ICT-104 bill acceptor protocolICT-104 bill acceptor protocol
ICT-104 bill acceptor protocolGergely Imreh
 
Facebook Messenger and Go
Facebook Messenger and GoFacebook Messenger and Go
Facebook Messenger and GoJeff Prestes
 
Technological advancements
Technological advancementsTechnological advancements
Technological advancementsCarson1510
 
Aeronautical communication
Aeronautical communicationAeronautical communication
Aeronautical communicationbhavithd
 
Will SCADA Systems Survive? The Future of Distributed Management Systems
Will SCADA Systems Survive? The Future of Distributed Management SystemsWill SCADA Systems Survive? The Future of Distributed Management Systems
Will SCADA Systems Survive? The Future of Distributed Management SystemsTibbo
 
IoT in Agriculture
IoT in AgricultureIoT in Agriculture
IoT in AgricultureTibbo
 
Connected Agricultural services and internet of things..
Connected Agricultural services and internet of things..Connected Agricultural services and internet of things..
Connected Agricultural services and internet of things..Atul Khiste
 
IoT for Agriculture - Drones / UAV
IoT for Agriculture - Drones / UAVIoT for Agriculture - Drones / UAV
IoT for Agriculture - Drones / UAVStart and Growth
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms Timothy Spann
 
Internet of Things and its applications
Internet of Things and its applicationsInternet of Things and its applications
Internet of Things and its applicationsPasquale Puzio
 

Destacado (20)

RaspberryPi + IoT - Lab to switch on and off a light bulb
RaspberryPi + IoT - Lab to switch on and off a light bulbRaspberryPi + IoT - Lab to switch on and off a light bulb
RaspberryPi + IoT - Lab to switch on and off a light bulb
 
Android Based Robots
Android Based RobotsAndroid Based Robots
Android Based Robots
 
IoT - IT 423 ppt
IoT - IT 423 pptIoT - IT 423 ppt
IoT - IT 423 ppt
 
Chapter 10:Understanding Java Related Platforms and Integration Technologies
Chapter 10:Understanding Java Related Platforms and Integration TechnologiesChapter 10:Understanding Java Related Platforms and Integration Technologies
Chapter 10:Understanding Java Related Platforms and Integration Technologies
 
Why Java
Why JavaWhy Java
Why Java
 
J2EE vs JavaEE
J2EE vs JavaEEJ2EE vs JavaEE
J2EE vs JavaEE
 
Java JSON Parser Comparison
Java JSON Parser ComparisonJava JSON Parser Comparison
Java JSON Parser Comparison
 
ICT-104 bill acceptor protocol
ICT-104 bill acceptor protocolICT-104 bill acceptor protocol
ICT-104 bill acceptor protocol
 
Facebook Messenger and Go
Facebook Messenger and GoFacebook Messenger and Go
Facebook Messenger and Go
 
Plant monitoring 101
Plant monitoring 101Plant monitoring 101
Plant monitoring 101
 
Technological advancements
Technological advancementsTechnological advancements
Technological advancements
 
Aeronautical communication
Aeronautical communicationAeronautical communication
Aeronautical communication
 
Will SCADA Systems Survive? The Future of Distributed Management Systems
Will SCADA Systems Survive? The Future of Distributed Management SystemsWill SCADA Systems Survive? The Future of Distributed Management Systems
Will SCADA Systems Survive? The Future of Distributed Management Systems
 
IoT in Agriculture
IoT in AgricultureIoT in Agriculture
IoT in Agriculture
 
Aeronautical Communications
Aeronautical CommunicationsAeronautical Communications
Aeronautical Communications
 
Connected Agricultural services and internet of things..
Connected Agricultural services and internet of things..Connected Agricultural services and internet of things..
Connected Agricultural services and internet of things..
 
IoT for Agriculture - Drones / UAV
IoT for Agriculture - Drones / UAVIoT for Agriculture - Drones / UAV
IoT for Agriculture - Drones / UAV
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms
 
Internet of Things and its applications
Internet of Things and its applicationsInternet of Things and its applications
Internet of Things and its applications
 

Similar a Java Device I/O at Raspberry PI to Build a Candy Vending Machine

How to make your Money Machine with Internet of Things
How to make your Money Machine with Internet of ThingsHow to make your Money Machine with Internet of Things
How to make your Money Machine with Internet of ThingsJeff Prestes
 
Raspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreBenjamin Moore
 
Raspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software SetupRaspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software SetupRANAALIMAJEEDRAJPUT
 
Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Mandeesh Singh
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introductionLotfi Messaoudi
 
Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Mandeesh Singh
 
Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014Mandeesh Singh
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Pance Cavkovski
 
Raspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your LibraryRaspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your LibraryBrian Pichman
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi LabStephen Chin
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data ServicesTom Kranz
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidVlatko Kosturjak
 
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data Everywhere
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data EverywhereApache Bigtop and ARM64 / AArch64 - Empowering Big Data Everywhere
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data EverywhereGanesh Raju
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
Run your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryRun your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryAndy Piper
 
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)jaxLondonConference
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfWiseNaeem
 
manual_2020_Cyber Physical System.pdf
manual_2020_Cyber Physical System.pdfmanual_2020_Cyber Physical System.pdf
manual_2020_Cyber Physical System.pdfssuserc5ee4c
 
Hadoop on raspberry pi PART 1
Hadoop on raspberry pi PART 1Hadoop on raspberry pi PART 1
Hadoop on raspberry pi PART 1Aniket Maithani
 

Similar a Java Device I/O at Raspberry PI to Build a Candy Vending Machine (20)

How to make your Money Machine with Internet of Things
How to make your Money Machine with Internet of ThingsHow to make your Money Machine with Internet of Things
How to make your Money Machine with Internet of Things
 
Raspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMoore
 
Raspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software SetupRaspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software Setup
 
Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
 
Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)
 
Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101
 
Raspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your LibraryRaspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your Library
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi Lab
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data Services
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
 
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data Everywhere
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data EverywhereApache Bigtop and ARM64 / AArch64 - Empowering Big Data Everywhere
Apache Bigtop and ARM64 / AArch64 - Empowering Big Data Everywhere
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Run your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryRun your Java apps on Cloud Foundry
Run your Java apps on Cloud Foundry
 
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
 
manual_2020_Cyber Physical System.pdf
manual_2020_Cyber Physical System.pdfmanual_2020_Cyber Physical System.pdf
manual_2020_Cyber Physical System.pdf
 
Hadoop on raspberry pi PART 1
Hadoop on raspberry pi PART 1Hadoop on raspberry pi PART 1
Hadoop on raspberry pi PART 1
 

Más de Jeff Prestes

Começando com Quorum - versão 2.6
Começando com Quorum - versão 2.6Começando com Quorum - versão 2.6
Começando com Quorum - versão 2.6Jeff Prestes
 
Desmistificando blockchain
Desmistificando blockchainDesmistificando blockchain
Desmistificando blockchainJeff Prestes
 
Aumento da eficácia jurídica com Smart Contracts
Aumento da eficácia jurídica com Smart ContractsAumento da eficácia jurídica com Smart Contracts
Aumento da eficácia jurídica com Smart ContractsJeff Prestes
 
Go (golang) - Porque ele deve ser a linguagem da sua próxima API
Go (golang) - Porque ele deve ser a linguagem da sua próxima APIGo (golang) - Porque ele deve ser a linguagem da sua próxima API
Go (golang) - Porque ele deve ser a linguagem da sua próxima APIJeff Prestes
 
Chatbots and Internet of Things
Chatbots and Internet of ThingsChatbots and Internet of Things
Chatbots and Internet of ThingsJeff Prestes
 
Beacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.jsBeacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.jsJeff Prestes
 
Eddystone Beacons - Physical Web - Giving a URL to All Objects
Eddystone Beacons - Physical Web - Giving a URL to All ObjectsEddystone Beacons - Physical Web - Giving a URL to All Objects
Eddystone Beacons - Physical Web - Giving a URL to All ObjectsJeff Prestes
 
Making Payments in Android Easy
Making Payments in Android EasyMaking Payments in Android Easy
Making Payments in Android EasyJeff Prestes
 
Kraken.js - Giving Extra Arms to your Node.js App
Kraken.js - Giving Extra Arms to your Node.js AppKraken.js - Giving Extra Arms to your Node.js App
Kraken.js - Giving Extra Arms to your Node.js AppJeff Prestes
 
Mobile Payments Workshop
Mobile Payments WorkshopMobile Payments Workshop
Mobile Payments WorkshopJeff Prestes
 
Interact your wearable and an iot device
Interact your wearable and an iot deviceInteract your wearable and an iot device
Interact your wearable and an iot deviceJeff Prestes
 
Fazendo maquinas para ganhar dinheiro com Internet das Coisas
Fazendo maquinas para ganhar dinheiro com Internet das CoisasFazendo maquinas para ganhar dinheiro com Internet das Coisas
Fazendo maquinas para ganhar dinheiro com Internet das CoisasJeff Prestes
 
Let your stuff talk!
Let your stuff talk!Let your stuff talk!
Let your stuff talk!Jeff Prestes
 
Express checkout PayPal
Express checkout PayPalExpress checkout PayPal
Express checkout PayPalJeff Prestes
 
Quercus - Running PHP over Java
Quercus - Running PHP over Java Quercus - Running PHP over Java
Quercus - Running PHP over Java Jeff Prestes
 
Beacon - Revolutionizing Mobile Apps In-Context
Beacon - Revolutionizing Mobile Apps In-ContextBeacon - Revolutionizing Mobile Apps In-Context
Beacon - Revolutionizing Mobile Apps In-ContextJeff Prestes
 

Más de Jeff Prestes (20)

Começando com Quorum - versão 2.6
Começando com Quorum - versão 2.6Começando com Quorum - versão 2.6
Começando com Quorum - versão 2.6
 
Solidity 0.6.x
Solidity 0.6.xSolidity 0.6.x
Solidity 0.6.x
 
Desmistificando blockchain
Desmistificando blockchainDesmistificando blockchain
Desmistificando blockchain
 
Aumento da eficácia jurídica com Smart Contracts
Aumento da eficácia jurídica com Smart ContractsAumento da eficácia jurídica com Smart Contracts
Aumento da eficácia jurídica com Smart Contracts
 
Go (golang) - Porque ele deve ser a linguagem da sua próxima API
Go (golang) - Porque ele deve ser a linguagem da sua próxima APIGo (golang) - Porque ele deve ser a linguagem da sua próxima API
Go (golang) - Porque ele deve ser a linguagem da sua próxima API
 
Chatbots and Internet of Things
Chatbots and Internet of ThingsChatbots and Internet of Things
Chatbots and Internet of Things
 
Physical web
Physical webPhysical web
Physical web
 
Beacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.jsBeacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.js
 
Eddystone Beacons - Physical Web - Giving a URL to All Objects
Eddystone Beacons - Physical Web - Giving a URL to All ObjectsEddystone Beacons - Physical Web - Giving a URL to All Objects
Eddystone Beacons - Physical Web - Giving a URL to All Objects
 
Making Payments in Android Easy
Making Payments in Android EasyMaking Payments in Android Easy
Making Payments in Android Easy
 
Kraken.js - Giving Extra Arms to your Node.js App
Kraken.js - Giving Extra Arms to your Node.js AppKraken.js - Giving Extra Arms to your Node.js App
Kraken.js - Giving Extra Arms to your Node.js App
 
Mobile Payments Workshop
Mobile Payments WorkshopMobile Payments Workshop
Mobile Payments Workshop
 
Interact your wearable and an iot device
Interact your wearable and an iot deviceInteract your wearable and an iot device
Interact your wearable and an iot device
 
Fazendo maquinas para ganhar dinheiro com Internet das Coisas
Fazendo maquinas para ganhar dinheiro com Internet das CoisasFazendo maquinas para ganhar dinheiro com Internet das Coisas
Fazendo maquinas para ganhar dinheiro com Internet das Coisas
 
Test A/B
Test A/BTest A/B
Test A/B
 
Let your stuff talk!
Let your stuff talk!Let your stuff talk!
Let your stuff talk!
 
Express checkout PayPal
Express checkout PayPalExpress checkout PayPal
Express checkout PayPal
 
Quercus - Running PHP over Java
Quercus - Running PHP over Java Quercus - Running PHP over Java
Quercus - Running PHP over Java
 
Open ID Connect
Open ID Connect Open ID Connect
Open ID Connect
 
Beacon - Revolutionizing Mobile Apps In-Context
Beacon - Revolutionizing Mobile Apps In-ContextBeacon - Revolutionizing Mobile Apps In-Context
Beacon - Revolutionizing Mobile Apps In-Context
 

Último

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Último (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Java Device I/O at Raspberry PI to Build a Candy Vending Machine

  • 1. Java Native GPIO Operations Using Device I/O API
  • 3. Agenda  What is not IoT  What is IoT  Polymath required skills  Small history of RaspberryPi  RaspberryPi Components and slots  Raspbian – a Debian/Linux to RasberryPi  Java support to SOC devices  Java Device I/O  Lab  Configure WiFi network (static / dhcp / resolv.conf)  Upgrade the Raspbian  Install WiringPi  Install Java for Embedded devices
  • 4. This is not IoT… (IMHO) This is so cool but this is Eletronic!!
  • 5. And this is not new… (who has gray hair can say… P)
  • 6. What is IoT? Internet Million of Web Services (PayPal, Twitter, Google, Netflix, Facebook) Things Billions of sensors, motors, displays, appliances, toys, cars, stores, robots +
  • 7. And to work with IoT you’re going to need more skills You’re going to need to a Polimath A polymath (Greek: πολυμαθής, polymathēs, "having learned much")[1] is a person whose expertise spans a significant number of different subject areas; such a person is known to draw on complex bodies of knowledge to solve specific problems. The term was first used in the seventeenth century; the related term, polyhistor, is an ancient term with similar meaning. (Source: Wikipedia - http://en.wikipedia.org/wiki/Polymath)
  • 8. Italian Polymath. What was da Vinci? Scientist? Engineer? Mathematic? Painter? Sculptor? Musician? Botanic? Anatomist? Source: Wikipedia - http://en.wikipedia.org/wiki/Leonardo_da_Vinci
  • 9. Server Side Eletronic (sometimes mechanic and sculptor on wood or iron) Client/Desktop Mobile (Beacons e Weareables) Operation Systems
  • 10.
  • 11. History  Designed in UK, University of Cambridge, 2006, to be a chip alternative to computers to students. Also a way to students rediscover how cool is to work with Robotic. It has been projected to educational purposes but can used in Commercial ones too.  Team that have concepted it: Eben Upton, Rob Mullins, Jack Lang and Alan Mycroft  Raspberry Pi Foundation was created and first alpha boards were tested, 2011  Sells begins April, 2012  Model B+ is released in November, 2012  More than 5 Million already have been sold
  • 12.
  • 13. Raspbian is an unofficial port of Debian Wheezy armhf with compilation settings adjusted to produce optimized "hard float" code that will run on the Raspberry Pi. Note: Raspbian is not affiliated with the Raspberry Pi Foundation. Raspbian was created by a small, dedicated team of developers that are fans of the Raspberry Pi hardware, the educational goals of the Raspberry Pi Foundation and, of course, the Debian Project. Best OS to Raspberry Pi nowadays. If you use Ubuntu, you’re going to feeling in home. All basic Unix commands works on it and almost all basic server-side too: Apache, Nginx, PHP, Java, Python, MySQL Default user: pi / Default password: raspberry And never forget: sudo apt-get install and be happy :D To install it in your MicroSD card (Recommend 8Gb or more) http://www.raspberrypi.org/documentation/installation/installing-images
  • 14. JDK SE for Embbeded Devices Since JDK 7, Java SE SDK for Desktop was ported to ARM chips and JDK 8 is already available. As Raspberry Pi is based in a ARM chip and runs over a Linux distribution you’re able to use Java SE You can run your favorite Java Application Server or create JavaFX applications (you don’t need to learn JME or Python anymore :D!)
  • 15. Device I/O API Originally part of Java ME library, The Device I/O project is an open source, Java-level API for accessing generic device peripherals on embedded devices based on JavaSE. It’s under OpenJDK project. https://wiki.openjdk.java.net/display/dio/Main http://docs.oracle.com/javame/8.0/api/dio/api/index.html
  • 16. Differences between Device I/O and PI4J PI4J is an excellent API, however it’s only for RaspberryPi if you would need to run your APP into a BeagleBone board will have to rewrite all GPIO access code. Device I/O, as other Java API, brings abstraction layer over GPIO access functionallity saving your time and complexity. Write once run anywhere :D
  • 17. Differences between Device I/O and PI4J Also, GPIO map is different in two APIs, check: Device I/O PI4J http://docs.oracle.com/javame/8.0/get-started-rpi/piportsapdx.htm http://pi4j.com/pins/model-b-plus.html
  • 18. Device I/O API Device I/O has a configuration file for each board The Raspberry PI file is dio.properties-raspberrypi It has definitions for each GPIO ports Thus Device I/O can works with different SoC Computers
  • 19. Device I/O API Device I/O requires special JDK permissions to access GPIO Device I/O comes with gpio.policy file You can map each Pin you’re planning to use or only: grant { permission jdk.dio.gpio.GPIOPinPermission "*:*"; permission jdk.dio.DeviceMgmtPermission "*:*", "open"; }; (okay, don’t do this in production kids)
  • 20.
  • 21.
  • 22.
  • 24.
  • 25. Configure your wifi credentials: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf (file content below) network={ ssid="iPhone" psk="43070720" } network={ ssid=”<<your-wifi-name-here>>" psk=”<<your-wifi-password>>" } network={ ssid="BoxNet" psk="hackkitty" }
  • 26. Configure your wifi network using static IP: sudo nano /etc/network/interfaces (file content below) auto lo iface lo inet loopback iface eth0 inet dhcp auto wlan0 allow-hotplug wlan0 iface wlan0 inet static address 192.168.20.218 netmask 255.255.255.0 gateway 192.168.20.1 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf iface default inet static
  • 27. Configure your wifi network using DHCP (most used): sudo nano /etc/network/interfaces (file content below) auto lo iface lo inet loopback iface eth0 inet dhcp auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp
  • 28. sudo apt-get update sudo apt-get dist-upgrade //Upgrades Raspbian sudo reboot //Use Reboot to restart Raspbian safetly sudo halt //Use halt to turn off Raspbian safetly
  • 29. sudo nano /etc/resolv.conf (file content below) nameserver 8.8.8.8 nameserver 8.8.4.4 //Google DNS servers Configure the DNS Servers
  • 30. Wiring Pi It is GPIO Interface library for the Raspberry Pi. It’s written in C for the BCM2835 used in the Raspberry Pi. WiringPi includes a command-line utility gpio which can be used to program and setup the GPIO pins.
  • 31. Wiring Pi $ sudo apt-get install git-core $ git clone git://git.drogon.net/wiringPi $ cd wiringPi $ git pull origin $ ./build Installation $ gpio -v $ gpio readall Test
  • 32. Get back to your user home directory (in this case you’re using pi user, remember?) $ cd ~/
  • 33. Downloading JDK SE 8 for Embedded I will have to download it from your computer as you will have to accept Oracle’s terms and conditions. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-arm-downloads-2187472.html Mac and Linux users: use scp to copy the file $ scp jdk-<version>-linux-arm-vfp-hflt.gz pi@<your-device- ip>:/home/pi/jdk-<version>-linux-arm-vfp-hflt.tar.gz (note that I’ve changed the extention because the downloaded file came only with .gz extention) Windows users: use WinSCP to do this
  • 34. Installing JDK SE 8 for Embedded At PI home directory execute: $ sudo mkdir -p /opt/java $ sudo chown root:root /opt/java $ cd /opt/java $ sudo tar xvzf ~/jdk-<version>-linux-arm-vfp-hflt.tar.gz Set default java and javac to the new installed JDK. $ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk-<version>/bin/javac 1 $ sudo update-alternatives --install /usr/bin/java java /opt/jdk-<version>/bin/java 1 $ sudo update-alternatives --config javac $ sudo update-alternatives --config java After all, verify with the commands with -verion option. $ java -version $ javac -version
  • 35. Installing JDK SE 8 for Embedded Double check if java version is correct for root too: $ sudo java -version $ sudo javac –version This is important because will you need to run your Java application that access GPIO with root privileges.
  • 36. Installing JDK SE 8 for Embedded Define JAVA_HOME environment variable: $ sudo nano /etc/environment And add to it: JAVA_HOME="/opt/jdk-<version>" Do the same in your bash profile $ nano ~/.bashrc And add to it: export JAVA_HOME="/opt/java/jdk-<version>" export PATH=$PATH:$JAVA_HOME/bin
  • 37. Installing Java Device I/O You’ll need to download and compile the library in your Raspberry PI. Device I/O like other OpenJDK projects uses Mercurial to manage their source code. You must install it into your Raspberry PI $ sudo apt-get install mercurial Create a directory to store the source code and compile it $ mkdir deviceio Download it $ cd deviceio $ hg clone http://hg.openjdk.java.net/dio/dev
  • 38. Installing Java Device I/O Let’s compile it: $ export PI_TOOLS=/usr $ cd dev $ make After this, let’s install your Device I/O files in your JRE $ cp -r build/deviceio/lib/* $JAVA_HOME/jre/lib
  • 39. Now let’s get started to talk about good things…
  • 40.
  • 41. Our Lab: Create a Candy Vending Machine How it works
  • 42. Our Lab: Create a Candy Vending Machine
  • 43. Let’s use Wiring Pi to test the circuits $ sudo gpio mode 1 output $ sudo gpio mode 4 output $ sudo gpio write 1 1 $ sudo gpio write 1 1 $ sudo gpio write 1 0 $ sudo gpio write 1 0 Our Lab: Create a Candy Vending Machine
  • 44. Copy the dio.jar compiled in your Raspberry Pi to your machine $ scp ~/deviceio/dev/build/jar/dio.jar <your- user>@<yourmachineip>:~/dio.jar Or use yout WinSCP Add it your Maven local repository $ mvn install:install-file -Dfile=~/dio.jar -DgroupId=jdk.dio - DartifactId=device-io -Dversion=1.0 -Dpackaging=jar - DgeneratePom=true Open the Netbeans and at Team->Git->Clone Repository https://github.com/jeffprestes/candies-client-native-java.git Our Lab: Create a Candy Vending Machine
  • 45.
  • 46.
  • 47. Copy the jar compiled with Dependencies to home’s directory of pi user. Now it’s time to edit GPIO permissions in gpio.policy file Copy it to home directory $ cp ~/deviceio/dev/samples/gpio/gpio.policy ~/gpio.policy And content must be like this grant { // permissions for using GPIO pin 18 GPIOLEDSample permission jdk.dio.gpio.GPIOPinPermission ":18"; permission jdk.dio.gpio.GPIOPinPermission "0:18"; permission jdk.dio.DeviceMgmtPermission "GPIO18:18", "open"; permission jdk.dio.gpio.GPIOPinPermission ":24"; permission jdk.dio.gpio.GPIOPinPermission "0:24"; permission jdk.dio.DeviceMgmtPermission "GPIO24:24", "open"; }; Our Lab: Create a Candy Vending Machine
  • 48. Now, let’s start the machine application $ sudo java -Djdk.dio.registry=/home/pi/java/dio/config/dio.properties-raspberrypi -Djava.security.policy=/home/pi/java/nativegpio/gpio.policy -jar candies.jar iot.eclipse.org jeffprestes/candies/world machineusa 1883 Where: iot.eclipse.org is the MQTT server jeffprestes/candies/world is the queue machineusa is the client name 1883 is the MQTT broker port Our Lab: Create a Candy Vending Machine
  • 49. Our Lab: Create a Candy Vending Machine To buy Create a Premier account in PayPal Sandbox developer.paypal.com -> Dashboard -> Sandbox -> Accounts -> Create Account Later, goto candies.novatrix.com.br in your mobile phone and use this user as a buyer
  • 50.
  • 51.