Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

36
Globalcode – Open4education Construíndo robots com Java Embedded Suite, REST, Raspberry PI and Arduino Vinicius Senger Globalcode Founder

description

Slides utilizados na apresentação do Vinicius Senger da Globalcode sobre Raspberry PI com JAva Embedded Suite e Arduino.

Transcript of Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Page 1: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

Construíndo robots com Java Embedded Suite, REST, Raspberry PI and Arduino

Vinicius Senger

Globalcode Founder

Page 2: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 3: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Quem somos…

Vinicius Senger – [email protected]

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;

Page 4: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Globalcode

Empresa de TreinamentosMuitos 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

Page 5: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 6: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 7: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

The Developers Conference

Page 8: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 9: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Neutrons Difractometer

Page 10: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Horse Instrumentation

Page 11: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Sail Boat Automation

Page 12: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Student Satellite

Page 13: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Low-cost D.I.Y. boards for kids

Page 14: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

• 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!

Page 15: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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");

Page 16: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 17: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Video blog "We are Crazy!"

• Funny video documenting the construction process• For teenagers / young developers• Motivational + fun + valuable information

Play Sample Video

Page 18: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Robots & Internet of Things

Robot = sensor, actuator and processing

IoT = sensor, actuator, processing + …

communication

integration

interoperation

security

massive update (even changing firmwares and drivers)

Page 19: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

The Robot….

Page 20: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Overview

Page 21: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 22: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 23: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Software List

Debian Default Raspberry PI

Java Embedded Suite x

Things-API.orgThings Embedded Gateway

Things4Arduino Serial Driver

Page 24: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Layer 1: Arduino + h-bridge + sensors

Using our own Program-ME board with Atmega328 + L293D + LDR + LM35 + 4 transistors

Page 25: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Layer 2: Raspberry PI + Router

• LiPo Battery + UBEC (5 volts regulator – 3 amps)

Page 26: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Layer 3: rotational sensors

• Servo + 2 Parallax Distance Sensor

Page 27: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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!

Page 28: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 29: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Things-API.org

The project Things-API.org

Page 30: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Things-API.org

Things-APISimple 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

Page 31: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Things Gateway: Server of Things

Proxy for Things that doesn't have TCP/IP:USB / Serial

ZigBee

Infrared

Bluetooth

Page 32: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

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

Page 33: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Gateway Things

Servidor Java EE

Thing #2Sensor Temperatura

Thing #3Robot aspirador pó

Things Gateway

ZigBee Bluetooth

Thing #1Luzes / Portão Casa

Ethernet

Page 34: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Things-API.org

DEMO & CODE

Page 35: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Things-API.org

Links and References

www.things-api.org

www.globalcode.com.br

jhome.globalcode.com.br

www.eletronlivre.com.br

blog.eletronlivre.com.br

Page 36: Contruindo Robots com Java Embedded Suite, Raspberry PI, Arduino e Things API

Globalcode – Open4education

@vsenger @yarasenger

Thanks!

Q&A

[email protected] - @vsenger

[email protected] - @yarasenger