Raspberry Pi with Java

Embed Size (px)

Citation preview

Raspberry PiwithJavakoji lin@twjug 2013/6/29

About Raspberry Pi

A credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation

Eben UptonCo-founder of the Raspberry Pi

Chip architect at Broadcom

For education purposePromoting the teaching of basic
computer science in schools

Raspberry PI Model B

SoC Broadcom BCM2835

CPUARM 11/700MHZ (ARMv6)

GPUBroadcom VideoCore IV,
OpenGL ES 2.0, 1080p30 h.264/MPEG-4 AVC high-profile
decoder

Raspberry PI

Memory512MB

IOHDMI

2 x USB

Ethernet

Header pins for GPIO, UART,
SPI and I2C

Power Only 3.5 W

Just $35

Attention

Power supply is important

SD cardClass 10 and > 4G

If you use Linux dd, please double check your command

For ?

A small computerA bit slower..

Media center Raspbmc

OpenELEC

Xbian

For ?

A small computerA bit slower..

Media center Raspbmc

OpenELEC

For ?

A small computerA bit slower..

Media center Raspbmc

OpenELEC

NAS

Wireless Access Point

Programming

Game

Minecraft Pi Edition

Minecraft Pi Edition

Pi Camera Module

Pi Camera Module

And More

Operating System

Raspbian(Debian) wheezy

Soft-float Debian wheezyEx: for Oracle JVM

Arch Linux ARM

Pidora

RISC OS

FreeBSD

Android

Firefox OS

New Out of Box Software

New Out of Box Software

It's easy

Copy to SD Card

Will partition for you

Give you the choice of OS

Includes recovery partition

Programming

Python as the educational languagePython 2.7.3

Any language can compile for ARMv6

The most interesting part is controlling GPIO

GPIO

Attention

GPIO IN/OUT is 3.3vDo not use voltage levels greater than 3.3V

Arduino is 5V

Do not connect power supply to any other pin

Be careful of static electricity

Java on PI

Java SE Embedded32~64MB/37~46MB RAM/ROM

Java SE Embedded 7 (Soft float)

Java SE Embedded 8 + JavaFX (Hard float)

Java ME Embedded8MB/5MB RAM/ROM

Java ME Embedded 3.3

Pi4J

Provide a bridge between the native libraries and Java for full access to the Raspberry Pi

Pi4J Example1

Resistor Calculator

Download them on Google Play & App Store

Pi4J Example2

Stepper Motor

GPIO3GPIO4GPIO5GPIO6

1OFFONONON

2ONOFFONON

3ONONOFFON

4ONONONOFF

Pi4J Example3

Pulse Width Modulation

Always ON

On/Off