This document discusses building robots using Java Embedded Suite, REST, Raspberry Pi and Arduino. It summarizes the speaker's background in Java and embedded systems. It then provides an overview of the robot project, including its hardware components like the Raspberry Pi and Arduino, and software components like the Java Embedded Suite and Things-API.org. The document demonstrates the robot and discusses using Raspberry Pi and Arduino together through serial communication.
Web & Social Media Analytics Previous Year Question Paper.pdf
Building Robots with Java Embedded Suite, REST, Raspberry PI and Arduino
1. Construíndo robots com Java Embedded
Suite, REST, Raspberry PI and Arduino
Vinicius Senger
Globalcode Founder
Globalcode – Open4education
2. Agenda
• Quem somos
• Embedded Background e Projetos
• Introdução ao Projeto
• Detalhes de Arquitetura do Robot
• Raspberry PI + Arduino
• Java Embedded Suite + REST Interface
• Things-API.org
• Demos
@vsenger
@yarasenger
Globalcode – Open4education
3. Quem somos…
Vinicius Senger – vinicius@globalcode.com.br
Trabalhando com Java há mais de 10 anos
Fundador da Globalcode
Ajudando a comunidade Java do Brasil
soujava.org.br
Rede de escolas de programação em 12 diferentes
cidades no Brasil;
@vsenger
@yarasenger
Globalcode – Open4education
4. Globalcode
Empresa de Treinamentos
Muitos treinamentos Java
Agile training, Mobile, Arduino and Robotics training
Long-term training for individuals and companies
Oracle Workforce Development Program
OTN Silver Partner
Mais de 3500 alunos por ano
@vsenger
@yarasenger
Globalcode – Open4education
5. Elétron Livre
Open-source hardware development
Treinamentos, workshop e conferências de
Embedded
Ferramentas e métodos de ensino para escolas
www.eletronlivre.com.br
@vsenger
@yarasenger
Globalcode – Open4education
6. Open4Education
Compartilhando conhecimento gratuito desde 2001
Ofercemos mais de 100 treinamentos gratuitos
Mais de 45.000 alunos
Auditório próprio
Cursos via web ou presencial
@vsenger
@yarasenger
Globalcode – Open4education
7. The Developers Conference
TDC 2 0 12 S ão Paulo
QUARTA - 04/07 QUINTA - 05/07 SEXTA - 06/07 SÁBADO - 07/07 DOMINGO - 08/07
B AN C O
SALA 1 J AVA J AVA EE J AVA C L OUD C OMP UTIN G
DE DADOS
UNIVERSITY
SALA 2 .N ET TE S TE S WEB .N E T MOBIL E
SALA 3 W IN DOW S R OB ÓTIC A E
AN DROID AR DUIN O P HP
P HON E DOMÓTIC A
SALA 4
AR QUITETUR A ALM J AVA EE S CAL A GAMES
SALA 5 WIN DOWS
IOS AN DR OID C/ C+ + EMP R EEN DEDOR IS MO
P HON E
SALA 6
AN ÁLIS E 2 .0 N OS QL TES TE S P Y THON AGIL E
SALA 7 MAR K ETIN G
MAN AGEMEN T 3 .0 S OA R UBY FR ONT-EN D
DIGITAL
SALA 8 L ADO B L ADO B DADOS AB ER TOS L ADO B TV DIGITAL
AUDITÓRIO S TADIUM S TADIUM S TADIUM S TADIUM S TADIUM
@vsenger
@yarasenger
Globalcode – Open4education
8. Embedded Roadmap
• 200x: Java ME (phone) / Sun Spot development
• 2009: started to produce educational boards based
on Arduino / ATMega
• 2010: low cost and open source robotics and home
automation
• 2011: jHome Automation
• 2012: Things-API.org
@vsenger
@yarasenger
Globalcode – Open4education
14. • Home Automation Platform based on Java EE and
do it yourself hardware / gadgets
• Allows you to integrate your house with social
networks like Twitter
• Different usage of Java EE and Glassfish
• Java Enterprise Edition Embedded comes a reality
with Java Enterprise Suite!
@vsenger
@yarasenger
Globalcode – Open4education
15. Things-API.org
Home Automation project evolution with more
abstract approach: Things Automation !?!
Internet of Things API / Things Automation API:
Provides a simple, uniform and easy to use API to read
sensors and control things;
Java SE, Java EE, Java ME, JavaFX = SAME API!
Things-API is the "JDBC" for Internet of Things
Communication Independent: IP, Serial, Bluetooth,
ZigBee, I2C, USB, etc.
things.execute("/dev/ttyUSB0", "sensor1");
@vsenger
@yarasenger
Globalcode – Open4education
16. About this project…
Part of research road-map for embedded, IoT,
home automation and robotics
Java Embedded Suite Experimentation
Home Automation Project Evolution
Internet of Things PoC
Cool demonstration platform
Just started in last December, +- 80 working hours
Prototype for a walking machine robot
@vsenger
@yarasenger
Globalcode – Open4education
17. Video blog "We are Crazy!"
• Funny video documenting the construction process
• For teenagers / young developers
• Motivational + fun + valuable information
Play Sample Video
@vsenger
@yarasenger
Globalcode – Open4education
18. Robots & Internet of Things
Robot = sensor, actuator and processing
IoT = sensor, actuator, processing + …
communication
integration
interoperation
security
massive update (even changing firmwares and
drivers)
@vsenger
@yarasenger
Globalcode – Open4education
21. This Robot
Based in reusable layers:
1. Robot base / mechanics and dedicated controller board
2. Intelligence, security and integration layear
3. Accessory layers:
Rotational Sensors
Arms
Cameras
@vsenger
@yarasenger
Globalcode – Open4education
22. Hardware List
• Raspberry PI
• Arduino based board with AVR ATMega328
• L293D as h-bridge
• 2 DC motors 12volts / 1 servo medium size
• 2 LIPO Batteries 1.5amp 11.1 volts
• 1 wifi router
• 1 UBEC for Raspberry power supply
• 2 Parallax distance sensor
• 1 LDR and 1 LM35
@vsenger
@yarasenger
Globalcode – Open4education
23. Software List
Debian Default Raspberry PI
Java Embedded Suite x
Things-API.org
Things Embedded Gateway
Things4Arduino Serial Driver
@vsenger
@yarasenger
Globalcode – Open4education
24. Layer 1: Arduino + h-bridge + sensors
Using our own Program-ME board with Atmega328
+ L293D + LDR + LM35 + 4 transistors
@vsenger
@yarasenger
Globalcode – Open4education
27. Raspberry PI vs Arduino
• Arduino is the baby steps to embedded and limited
microcontroller programming;
• Raspberry PI is the baby step for ARM
microcontroller programming;
• Arduinos (or Atmegas) are very useful as a
dedicated actuator / sensor control / driver;
• Raspberry PI will provide powerful processing,
security, integration, full TCP/IP and so on..
• Prototyping platform + TCP/IP = EXPENSIVE!
@vsenger
@yarasenger
Globalcode – Open4education
28. Raspberry PI + Arduino: how?
Serial RXTX
Easy and simple
Sync issues
Limited speedy
I2C: our next step using Device Access API
SPI: for faster communication
@vsenger
@yarasenger
Globalcode – Open4education
30. Things-API.org
Things-API
Simple abstraction:
Device: the thing
Component: some part of the thing
Component = Input / Output:
Input = Sensor : light, temperature, accelerometer, gyro, etc..;
Output = Actuator : motor, led, relay, buzzer;
Sensors = read
Actuator = write
@vsenger
@yarasenger
Globalcode – Open4education
31. Things Gateway: Server of Things
Proxy for Things that doesn't have TCP/IP:
USB / Serial
ZigBee
Infrared
Bluetooth
@vsenger
@yarasenger
Globalcode – Open4education
32. Things-API.org
Things-API for Java SE, EE and ME
Things-Gateway Java EE
Things-Gateway Embedded Suite
Things-Driver
Things-Automation
jHome Automation: reference implementation
@vsenger
@yarasenger
Globalcode – Open4education
33. Gateway Things
Things
Gateway
Servidor Java EE
Ethernet ZigBee Bluetooth
Thing #1 Thing #2 Thing #3
Luzes / Portão Casa Sensor Temperatura Robot aspirador pó
@vsenger
@yarasenger
Globalcode – Open4education