SlideShare a Scribd company logo
1 of 49
About me…
@jeffprestes
github.com/jeffprestes
slideshare.net/jeffprestes
Developer Advocate
Java, PHP, JavaScript,
Android Developer
Football fan, husband,
father and IoT Researcher
an important
Disclaimer
@braintree_dev @jeffprestes
@braintree_dev @jeffprestes
@braintree_dev @jeffprestes
Demo…
@braintree_dev @jeffprestes
This is not IoT… (IMHO)
so cool.. but this is Robotics!!
@braintree_dev @jeffprestes
(who have gray hair can say… P)
And this is not new…
Internet
Millions of Web Services
Braintree, PayPal, Twitter,
Google, Netflix, Facebook
Things
Millions of Devices
Sensors, Microcontrollers, Motors,
Single Board Computers, Displays
+
@braintree_dev @jeffprestes
Server Side
Electronics
(tinker too maybe?)
Client/Desktop
Mobile
(Beacons e Weareables too?)
Operational Systems
@braintree_dev @jeffprestes
IoT requires several skils
You will need to be 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.
(Source: Wikipedia - http://en.wikipedia.org/wiki/Polymath)
@braintree_dev @jeffprestes
Italian Polymath. What was da Vinci? Scientist?
Engineer? Mathematic? Painter? Sculptor?
Musician? Botanic? Anatomist?
Source: Wikipedia - http://en.wikipedia.org/wiki/Leonardo_da_Vinci
Could IoT bring us a broad vision
of Technology?
No more specialists…
But new Polymath Developers
@braintree_dev @jeffprestes
#polimathdevs
Candy Machine technology stack
Have you had noticed ?
@braintree_dev @jeffprestes
By the way… all we use is
Ask to charge
Gateway
Ask to charge
customer CC
Autoriza a compra
WebServices
MQTT (Socket)
Post a message on queue to release candies
GPIO
Web
Notifies
watch
Customer
confirms
Returns OK
Candy Machine workflow
Electronic Schema
@braintree_dev @jeffprestes
Projects involved
@braintree_dev @jeffprestes
Java Client to run at Raspberry Pi
http://github.com/jeffprestes/candies-client
Android for Smart Phone & Watch
http://github.com/jeffprestes/candies-android
PHP Web Client
http://github.com/jeffprestes/candies-paypal-php
PHP Gateway
http://github.com/jeffprestes/gateway
They’re Open Source and contributions are welcomed.
@braintree_dev @jeffprestes
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.
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
After the image been written on MicroSD card, insert it on Raspberry Pi MicroSD slot reader.
Turn your Raspberry Pi plugging in the Power Supply
Raspberry Pi Setup
Configuring Raspbian – An Linux Distro to Raspberry Pi
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"
}
Raspberry Pi Setup
Configuring Raspbian – An Linux Distro to Raspberry Pi
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.0.218
netmask 255.255.255.0
gateway 192.168.0.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet static
Raspberry Pi Setup
Configuring Raspbian – An Linux Distro to Raspberry Pi
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
Raspberry Pi Setup
Configuring Raspbian – An Linux Distro to Raspberry Pi
@braintree_dev @jeffprestes
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
Raspberry Pi Setup
Configuring Raspbian – An Linux Distro to Raspberry Pi
@braintree_dev @jeffprestes
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
Raspberry Pi Setup
Configuring Raspbian – An Linux Distro to Raspberry Pi
@braintree_dev @jeffprestes
Downloading
JDK SE 8 for Embedded
We 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
@braintree_dev @jeffprestes
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!)
@braintree_dev @jeffprestes
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
@braintree_dev @jeffprestes
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
@braintree_dev @jeffprestes
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
@braintree_dev @jeffprestes
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)
@braintree_dev @jeffprestes
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
@braintree_dev @jeffprestes
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.
@braintree_dev @jeffprestes
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
@braintree_dev @jeffprestes
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
@braintree_dev @jeffprestes
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
@braintree_dev @jeffprestes
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
Compiling Candy Machine
client controller
@braintree_dev @jeffprestes
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";
};
Compiling Candy Machine
client controller
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
Executing Candy Machine
client controller
@braintree_dev @jeffprestes
Testing the Candy Machine
How? Buying…
To buy
Create a Premier account in PayPal Sandbox
developer.paypal.com -> Dashboard -> Sandbox -> Accounts ->
Create Account
Later, get a cup, get closer to the machine and access
candies.novatrix.com.br in your mobile phone or computer and
use this user as a buyer
@braintree_dev @jeffprestes
Android Client
Workflow
@braintree_dev @jeffprestes
Android Client
Requirements
@braintree_dev @jeffprestes
We’re going to get the code from Git and to use Android Studio 1.0 to edit
the client. Minimum SDK Version is 18.
$ git clone https://github.com/jeffprestes/candies-android.git
Open Android Studio and import the project.
You will need a Beacon to test. If you have one, get his UUDI, Major and
Minor.
If you don’t know it, get “Beacon Scanner & Logger (free)” app from Google
Play to scan your environment.
Android Client
Libraries
@braintree_dev @jeffprestes
We use AltBeacon library to detect Beacons.
We use MQTT to send messages to Broker
We use Volley to access Gateway Web Services
compile(name:'android-beacon-library', ext:'aar')
compile 'com.mcxiaoke.volley:library:1.0.9'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
compile 'com.squareup.okhttp:okhttp:2.1.0'
Android Client
Configuration
@braintree_dev @jeffprestes
Define your Beacons’ information at Constants.java
As it may varies when for Release and Debug environments, it’s at specifics
directories in the project.
compile(name:'android-beacon-library', ext:'aar')
compile 'com.mcxiaoke.volley:library:1.0.9'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
compile 'com.squareup.okhttp:okhttp:2.1.0'
Android Client
Execution
@braintree_dev @jeffprestes
It’s done!
Now you just need to build and execute in your smartphone.
The Build variables are set to Debug.
(don’t forget to activate your Bluetooth)
@braintree_dev @jeffprestes
@braintree_dev @jeffprestes
Thanks.
Jeff Prestes
@jeffprestes
Slideshare.com/jeffprestes
Github.com/jeffprestes
@paypaldev
developer.paypal.com
developers.braintreepayments.com

More Related Content

What's hot

rake puppetexpert:create - Puppet Camp Silicon Valley 2014
rake puppetexpert:create - Puppet Camp Silicon Valley 2014rake puppetexpert:create - Puppet Camp Silicon Valley 2014
rake puppetexpert:create - Puppet Camp Silicon Valley 2014nvpuppet
 
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattlegarrett honeycutt
 
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicagogarrett honeycutt
 
One Step Ahead of Cheaters -- Instrumenting Android Emulators
One Step Ahead of Cheaters -- Instrumenting Android EmulatorsOne Step Ahead of Cheaters -- Instrumenting Android Emulators
One Step Ahead of Cheaters -- Instrumenting Android EmulatorsPriyanka Aash
 
Mobile Development integration tests
Mobile Development integration testsMobile Development integration tests
Mobile Development integration testsKenneth Poon
 
LicensePlist - A license list generator of all your dependencies for iOS appl...
LicensePlist - A license list generator of all your dependencies for iOS appl...LicensePlist - A license list generator of all your dependencies for iOS appl...
LicensePlist - A license list generator of all your dependencies for iOS appl...将之 小野
 
Learn Puppet : Quest Guide for the Learning VM
Learn Puppet : Quest Guide for the Learning VMLearn Puppet : Quest Guide for the Learning VM
Learn Puppet : Quest Guide for the Learning VMKumaran Balachandran
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2Pascal Rapicault
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesNational Cheng Kung University
 
p2, modular provisioning for OSGi
p2, modular provisioning for OSGip2, modular provisioning for OSGi
p2, modular provisioning for OSGiPascal Rapicault
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
Apps development for Recon HUDs
Apps development for Recon HUDsApps development for Recon HUDs
Apps development for Recon HUDsXavier Hallade
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitPascal Rapicault
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with PuppetAlessandro Franceschi
 
Docker and Django Meet For A Tango - London Meetup
Docker and Django Meet For A Tango - London MeetupDocker and Django Meet For A Tango - London Meetup
Docker and Django Meet For A Tango - London Meetupfrentrup
 
Benchmarking the Efficiency of Your Tools
Benchmarking the Efficiency of Your ToolsBenchmarking the Efficiency of Your Tools
Benchmarking the Efficiency of Your ToolsMarian Marinov
 
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPGIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPPavel Tyk
 
Puppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLabPuppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLabAlessandro Franceschi
 

What's hot (20)

Discovering the p2 API
Discovering the p2 APIDiscovering the p2 API
Discovering the p2 API
 
rake puppetexpert:create - Puppet Camp Silicon Valley 2014
rake puppetexpert:create - Puppet Camp Silicon Valley 2014rake puppetexpert:create - Puppet Camp Silicon Valley 2014
rake puppetexpert:create - Puppet Camp Silicon Valley 2014
 
Building aosp
Building aospBuilding aosp
Building aosp
 
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
 
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
 
One Step Ahead of Cheaters -- Instrumenting Android Emulators
One Step Ahead of Cheaters -- Instrumenting Android EmulatorsOne Step Ahead of Cheaters -- Instrumenting Android Emulators
One Step Ahead of Cheaters -- Instrumenting Android Emulators
 
Mobile Development integration tests
Mobile Development integration testsMobile Development integration tests
Mobile Development integration tests
 
LicensePlist - A license list generator of all your dependencies for iOS appl...
LicensePlist - A license list generator of all your dependencies for iOS appl...LicensePlist - A license list generator of all your dependencies for iOS appl...
LicensePlist - A license list generator of all your dependencies for iOS appl...
 
Learn Puppet : Quest Guide for the Learning VM
Learn Puppet : Quest Guide for the Learning VMLearn Puppet : Quest Guide for the Learning VM
Learn Puppet : Quest Guide for the Learning VM
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
 
p2, modular provisioning for OSGi
p2, modular provisioning for OSGip2, modular provisioning for OSGi
p2, modular provisioning for OSGi
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Apps development for Recon HUDs
Apps development for Recon HUDsApps development for Recon HUDs
Apps development for Recon HUDs
 
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profit
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with Puppet
 
Docker and Django Meet For A Tango - London Meetup
Docker and Django Meet For A Tango - London MeetupDocker and Django Meet For A Tango - London Meetup
Docker and Django Meet For A Tango - London Meetup
 
Benchmarking the Efficiency of Your Tools
Benchmarking the Efficiency of Your ToolsBenchmarking the Efficiency of Your Tools
Benchmarking the Efficiency of Your Tools
 
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPGIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APP
 
Puppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLabPuppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLab
 

Similar to Java Developer Advocate Shares IoT Knowledge

Java Device I/O at Raspberry PI to Build a Candy Vending Machine
Java Device I/O at Raspberry PI to Build a Candy Vending MachineJava Device I/O at Raspberry PI to Build a Candy Vending Machine
Java Device I/O at Raspberry PI to Build a Candy Vending MachineJeff Prestes
 
Building your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry PiBuilding your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry PiJeff Prestes
 
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
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosStephen Chin
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Pance Cavkovski
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi LabStephen Chin
 
PowerShell: A Language for the Internet of Things #ATLPUG
PowerShell: A Language for the Internet of Things #ATLPUGPowerShell: A Language for the Internet of Things #ATLPUG
PowerShell: A Language for the Internet of Things #ATLPUGTaylor Riggan
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textToma Velev
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsPositive Hack Days
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesNicola Ferraro
 
Iz Pack
Iz PackIz Pack
Iz PackInria
 
Setting up and open fidy dev environment
Setting up and open fidy dev environmentSetting up and open fidy dev environment
Setting up and open fidy dev environmentianibbo
 
Raspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreBenjamin Moore
 
Android tutorials1 install_ide
Android tutorials1 install_ideAndroid tutorials1 install_ide
Android tutorials1 install_ideVlad Kolesnyk
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKJosé Paumard
 
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 (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Mandeesh Singh
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introductionLotfi Messaoudi
 

Similar to Java Developer Advocate Shares IoT Knowledge (20)

Java Device I/O at Raspberry PI to Build a Candy Vending Machine
Java Device I/O at Raspberry PI to Build a Candy Vending MachineJava Device I/O at Raspberry PI to Build a Candy Vending Machine
Java Device I/O at Raspberry PI to Build a Candy Vending Machine
 
Building your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry PiBuilding your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry Pi
 
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
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and Legos
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi Lab
 
PowerShell: A Language for the Internet of Things #ATLPUG
PowerShell: A Language for the Internet of Things #ATLPUGPowerShell: A Language for the Internet of Things #ATLPUG
PowerShell: A Language for the Internet of Things #ATLPUG
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - text
 
Manish Chasta - Securing Android Applications
Manish Chasta - Securing Android ApplicationsManish Chasta - Securing Android Applications
Manish Chasta - Securing Android Applications
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with Kubernetes
 
Iz Pack
Iz PackIz Pack
Iz Pack
 
Setting up and open fidy dev environment
Setting up and open fidy dev environmentSetting up and open fidy dev environment
Setting up and open fidy dev environment
 
Raspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMoore
 
Android tutorials1 install_ide
Android tutorials1 install_ideAndroid tutorials1 install_ide
Android tutorials1 install_ide
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
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 (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
 
JAVA CORE
JAVA COREJAVA CORE
JAVA CORE
 

More from 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
 
Facebook Messenger and Go
Facebook Messenger and GoFacebook Messenger and Go
Facebook Messenger and GoJeff 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
 

More from 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
 
Facebook Messenger and Go
Facebook Messenger and GoFacebook Messenger and Go
Facebook Messenger and Go
 
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
 

Recently uploaded

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"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
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"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
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

Java Developer Advocate Shares IoT Knowledge

  • 1.
  • 2. About me… @jeffprestes github.com/jeffprestes slideshare.net/jeffprestes Developer Advocate Java, PHP, JavaScript, Android Developer Football fan, husband, father and IoT Researcher
  • 3.
  • 8. This is not IoT… (IMHO) so cool.. but this is Robotics!! @braintree_dev @jeffprestes
  • 9. (who have gray hair can say… P) And this is not new…
  • 10. Internet Millions of Web Services Braintree, PayPal, Twitter, Google, Netflix, Facebook Things Millions of Devices Sensors, Microcontrollers, Motors, Single Board Computers, Displays + @braintree_dev @jeffprestes
  • 11. Server Side Electronics (tinker too maybe?) Client/Desktop Mobile (Beacons e Weareables too?) Operational Systems @braintree_dev @jeffprestes
  • 12. IoT requires several skils You will need to be 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. (Source: Wikipedia - http://en.wikipedia.org/wiki/Polymath) @braintree_dev @jeffprestes
  • 13. Italian Polymath. What was da Vinci? Scientist? Engineer? Mathematic? Painter? Sculptor? Musician? Botanic? Anatomist? Source: Wikipedia - http://en.wikipedia.org/wiki/Leonardo_da_Vinci Could IoT bring us a broad vision of Technology? No more specialists… But new Polymath Developers @braintree_dev @jeffprestes #polimathdevs
  • 15. Have you had noticed ? @braintree_dev @jeffprestes By the way… all we use is
  • 16. Ask to charge Gateway Ask to charge customer CC Autoriza a compra WebServices MQTT (Socket) Post a message on queue to release candies GPIO Web Notifies watch Customer confirms Returns OK Candy Machine workflow
  • 17.
  • 19. Projects involved @braintree_dev @jeffprestes Java Client to run at Raspberry Pi http://github.com/jeffprestes/candies-client Android for Smart Phone & Watch http://github.com/jeffprestes/candies-android PHP Web Client http://github.com/jeffprestes/candies-paypal-php PHP Gateway http://github.com/jeffprestes/gateway They’re Open Source and contributions are welcomed.
  • 20. @braintree_dev @jeffprestes 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. 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 After the image been written on MicroSD card, insert it on Raspberry Pi MicroSD slot reader. Turn your Raspberry Pi plugging in the Power Supply Raspberry Pi Setup Configuring Raspbian – An Linux Distro to Raspberry Pi
  • 21. 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" } Raspberry Pi Setup Configuring Raspbian – An Linux Distro to Raspberry Pi
  • 22. 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.0.218 netmask 255.255.255.0 gateway 192.168.0.1 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf iface default inet static Raspberry Pi Setup Configuring Raspbian – An Linux Distro to Raspberry Pi
  • 23. 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 Raspberry Pi Setup Configuring Raspbian – An Linux Distro to Raspberry Pi @braintree_dev @jeffprestes
  • 24. 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 Raspberry Pi Setup Configuring Raspbian – An Linux Distro to Raspberry Pi @braintree_dev @jeffprestes
  • 25. 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 Raspberry Pi Setup Configuring Raspbian – An Linux Distro to Raspberry Pi @braintree_dev @jeffprestes
  • 26. Downloading JDK SE 8 for Embedded We 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 @braintree_dev @jeffprestes
  • 27. 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!) @braintree_dev @jeffprestes
  • 28. 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 @braintree_dev @jeffprestes
  • 29. 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 @braintree_dev @jeffprestes
  • 30. 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
  • 31. 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 @braintree_dev @jeffprestes
  • 32. 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) @braintree_dev @jeffprestes
  • 33. 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 @braintree_dev @jeffprestes
  • 34. 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. @braintree_dev @jeffprestes
  • 35. 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 @braintree_dev @jeffprestes
  • 36. 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 @braintree_dev @jeffprestes
  • 37. 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 @braintree_dev @jeffprestes
  • 38. 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 Compiling Candy Machine client controller @braintree_dev @jeffprestes
  • 39. 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"; }; Compiling Candy Machine client controller
  • 40. 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 Executing Candy Machine client controller @braintree_dev @jeffprestes
  • 41. Testing the Candy Machine How? Buying… To buy Create a Premier account in PayPal Sandbox developer.paypal.com -> Dashboard -> Sandbox -> Accounts -> Create Account Later, get a cup, get closer to the machine and access candies.novatrix.com.br in your mobile phone or computer and use this user as a buyer @braintree_dev @jeffprestes
  • 43. Android Client Requirements @braintree_dev @jeffprestes We’re going to get the code from Git and to use Android Studio 1.0 to edit the client. Minimum SDK Version is 18. $ git clone https://github.com/jeffprestes/candies-android.git Open Android Studio and import the project. You will need a Beacon to test. If you have one, get his UUDI, Major and Minor. If you don’t know it, get “Beacon Scanner & Logger (free)” app from Google Play to scan your environment.
  • 44. Android Client Libraries @braintree_dev @jeffprestes We use AltBeacon library to detect Beacons. We use MQTT to send messages to Broker We use Volley to access Gateway Web Services compile(name:'android-beacon-library', ext:'aar') compile 'com.mcxiaoke.volley:library:1.0.9' compile 'com.google.code.gson:gson:2.3.1' compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.android.support:support-v4:21.0.3' compile 'com.google.android.gms:play-services:6.5.87' compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2' compile 'com.squareup.okhttp:okhttp:2.1.0'
  • 45. Android Client Configuration @braintree_dev @jeffprestes Define your Beacons’ information at Constants.java As it may varies when for Release and Debug environments, it’s at specifics directories in the project. compile(name:'android-beacon-library', ext:'aar') compile 'com.mcxiaoke.volley:library:1.0.9' compile 'com.google.code.gson:gson:2.3.1' compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.android.support:support-v4:21.0.3' compile 'com.google.android.gms:play-services:6.5.87' compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2' compile 'com.squareup.okhttp:okhttp:2.1.0'
  • 46. Android Client Execution @braintree_dev @jeffprestes It’s done! Now you just need to build and execute in your smartphone. The Build variables are set to Debug. (don’t forget to activate your Bluetooth)