슬라이드 1

Similar documents
DE1-SoC Board

APOGEE Insight_KR_Base_3P11

Interstage5 SOAP서비스 설정 가이드

Voice Portal using Oracle 9i AS Wireless

Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

SchoolNet튜토리얼.PDF

歯I-3_무선통신기반차세대망-조동호.PDF

KDTÁ¾ÇÕ-1-07/03

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

AGENDA 모바일 산업의 환경변화 모바일 클라우드 서비스의 등장 모바일 클라우드 서비스 융합사례



°í¼®ÁÖ Ãâ·Â

컴퓨터과학과 교육목표 컴퓨터과학과의 컴퓨터과학 프로그램은 해당분야 에서 학문적 기술을 창의적으로 연구하고 산업적 기술을 주도적으로 개발하는 우수한 인력을 양성 함과 동시에 직업적 도덕적 책임의식을 갖는 IT인 육성을 교육목표로 한다. 1. 전공 기본 지식을 체계적으로

Intro to Servlet, EJB, JSP, WS

10X56_NWG_KOR.indd

02 C h a p t e r Java

KDTÁ¾ÇÕ-2-07/03

Special Theme _ 모바일웹과 스마트폰 본 고에서는 모바일웹에서의 단말 API인 W3C DAP (Device API and Policy) 의 표준 개발 현황에 대해서 살펴보고 관 련하여 개발 중인 사례를 통하여 이해를 돕고자 한다. 2. 웹 애플리케이션과 네이

chapter4

CD-RW_Advanced.PDF

MPLAB C18 C

HTML5* Web Development to the next level HTML5 ~= HTML + CSS + JS API

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

1217 WebTrafMon II

±èÇö¿í Ãâ·Â

, N-. N- DLNA(Digital Living Network Alliance).,. DLNA DLNA. DLNA,, UPnP, IPv4, HTTP DLNA. DLNA, DLNA [1]. DLNA DLNA DLNA., [2]. DLNA UPnP. DLNA DLNA.

Portal_9iAS.ppt [읽기 전용]

PCServerMgmt7

¨ìÃÊÁ¡2

08SW

라즈베리파이 프로그래밍_130912(최종).indd

Windows Embedded Compact 2013 [그림 1]은 Windows CE 로 알려진 Microsoft의 Windows Embedded Compact OS의 history를 보여주고 있다. [표 1] 은 각 Windows CE 버전들의 주요 특징들을 담고

김기남_ATDC2016_160620_[키노트].key

J2EE & Web Services iSeminar

MasoJava4_Dongbin.PDF

PowerPoint 프레젠테이션

Assign an IP Address and Access the Video Stream - Installation Guide

자바-11장N'1-502

05Àå

( )부록

<31325FB1E8B0E6BCBA2E687770>

Microsoft PowerPoint - eSlim SV [ ]

제 출 문 환경부장관 귀하 본 보고서를 습마트기기 활용 환경지킴이 및 교육 통합 서비스 개 발 과제의 최종보고서로 제출합니다. 주관연구기관 : 주관연구기관장 : 2015년 10월 주식회사 덕키즈 김 형 준 (주관)연구책임자 : 문종욱 (주관)참여연구원 : 김형준, 문병

ecorp-프로젝트제안서작성실무(양식3)

The Self-Managing Database : Automatic Health Monitoring and Alerting

歯김한석.PDF

30이지은.hwp

Integ

solution map_....

매력적인 맥/iOS 개발 환경 그림 A-1 변경 사항 확인창 Validate Setting... 항목을 고르면 된다. 프로젝트 편집기를 선택했을 때 화면 아 래쪽에 있는 동일한 Validate Settings... 버튼을 클릭해도 된다. 이슈 내비게이터 목록에서 변경할

디지털포렌식학회 논문양식

VZ94-한글매뉴얼

Solaris Express Developer Edition

Microsoft Word - KSR2014S042

hd1300_k_v1r2_Final_.PDF

인켈(국문)pdf.pdf

FMX M JPG 15MB 320x240 30fps, 160Kbps 11MB View operation,, seek seek Random Access Average Read Sequential Read 12 FMX () 2

<32382DC3BBB0A2C0E5BED6C0DA2E687770>

0125_ 워크샵 발표자료_완성.key


ESP1ºÎ-04

K7VT2_QIG_v3

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서

No Slide Title

istay

슬라이드 1

1. GigE Camera Interface를 위한 최소 PC 사양 CPU : Intel Core 2 Duo, 2.4GHz이상 RAM : 2GB 이상 LANcard : Intel PRO/1000xT 이상 VGA : PCI x 16, VRAM DDR2 RAM 256MB

15_3oracle

PowerPoint 프레젠테이션

vm-웨어-앞부속

강의10

11¹Ú´ö±Ô

안전을 위한 주의사항 제품을 올바르게 사용하여 위험이나 재산상의 피해를 미리 막기 위한 내용이므로 반드시 지켜 주시기 바랍니다. 2 경고 설치 관련 지시사항을 위반했을 때 심각한 상해가 발생하거나 사망에 이를 가능성이 있는 경우 설치하기 전에 반드시 본 기기의 전원을

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

<BBF3C7A5C6C7B7CA28C1A6BABBBFEB2034BAD0B1E2292E687770>

교육2 ? 그림

rmi_박준용_final.PDF

Copyright 0, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT RIGHTS Programs, software, databases, and related

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,,,,,,,,,,,,,.,..., U.S. GOVERNMENT END USERS. Oracle programs, including any operat

Service-Oriented Architecture Copyright Tmax Soft 2005

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C

untitled

(SW3704) Gingerbread Source Build & Working Guide

Microsoft Word - Automap3

IT & Future Strategy 보고서 는 21세기 한국사회의 주요 패러다임 변화를 분석하고 이를 토대로 미래 초연결 사회의 주요 이슈를 전망, IT를 통한 해결 방안을 모색하기 위해 한국정보화진흥원 (NIA) 에서 기획, 발간하는 보고서입니 다. NIA 의 승인

초보자를 위한 C++

Analyst Briefing

Contents I. 칼라스 네트워크 플레이어란 1. Pc-Fi를 넘어서 발전한 차세대 음악 플레이어 칼라스 네트워크 플레이어의 장점 3. 시스템 기본 구성

Gartner Day

SW¹é¼Ł-³¯°³Æ÷ÇÔÇ¥Áö2013

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

6주차.key

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (

untitled

CL100B_manual_kor_m.0.2.indd

<333820B1E8C8AFBFEB2D5A B8A620C0CCBFEBC7D120BDC7BFDC20C0A7C4A1C3DFC1A42E687770>

SRC PLUS 제어기 MANUAL

Transcription:

Embedded Java 개발 자를 향한달콤한딸기의유혹 최승호 (seungho.choi@oracle.com)

Internet of Things Meets Big Data Personal Devices Med-Large Embedded / Multi-function Devices VoIP Communications Sensors / Microcontrollers Industrial controls / Network Appliances Cloud for Embedded Devices Meters Smart Appliances & electronics Connected Vehicles Management / Monitoring / Operations Enterprise Data & Applications

Industry Trends & Challenges TRENDS More Devices, Connected with Increased Capabilities Infrastructure extending to include Edge Devices Enormous amount of net new data New value-added services based on this data/connectivity CHALLENGES Custom Proprietary Solutions Lack of Platform Standards Hardware Fragmentation Multiple OS support Limited Developer and ISV ecosystems Insufficient Network Bandwidth

Java Delivers Technical Value Standards based Vast developer base of over 9M Free development tools and Mature, robust and secure run-time environment Cross platform compatibility Supported on small to large devices Seamless integration with backend services Provides a complete end to end platform to develop standards based services

Servers Desktop Embedded TV Mobile Card BD-J Key APIs Java EE JavaFX Java TV MSA Platform Java SE Java ME Java Card Language Java Language Java Platform

Java Embedded Product Family Embedded Mobile Card Java TV MSA Java SE Java ME Java Card Java Language

Java Embedded : Broadest Device Coverage

Java Embedded : Today Platform Footprint 10MB-100MB Java ME/CDC + Java SE 1MB-10MB 50KB-1MB Java Card Java ME/CLDC Small Embedded (feature phones, meters, Diagnostics, M2M Telco ) ARM 7 Cortex M ARM9/11 CortexA/PPC Mid Embedded (ereaders, VOIP, Network Eqmt, Printers, Imaging, Industrial M2M, Connected TV, Set-top boxes) MIPS32/Intel Atom/ARM High Embedded (Smartphones, Netbooks, Medical Instruments, Industrial Equipment, Embedded Servers) Device CPU/ GPU/I-O

Java ME Embedded 3.2 Stack Embedded Application(s) Logging API XML JSR 280 Security & Trust JSR 177 subset Java ME SDK Test, Emulate OEM Extension APIs * AMS API AccessPoint API Device Access API Location JSR 179 Messaging JSR 120 Web Services JSR 172 File I/O JSR 75 NetBeans IDE Develop, Deploy, Debug IMP-NG (JSR 228) Eclipse Plug-in CLDC Virtual Machine (JSR 139) Multi-tasking On-device debugging VM configurator Porting Layer * Porting Win32 Emulation port * Reference Board port * Device Operating System Additional platform port(s) Integration Network File GPS Serial I 2 C SPI GPIO...... Specialization Legend: Standardized Components Hardware Oracle Unique Features 3 rd Party Components (*) : Modifiable Components

Java Embedded is an Ideal Platform for Embedded Applications Secure, flexible execution environment: sandbox model Inherent cross-platform application compatibility Extensive developer, community, and industry support Based on open standards driven through the Java Community Process

Java Embedded UI Lightweight for smaller devices Full rich graphics for larger higher-end devices Take advantage of hardware acceleration where available Tools and ease of development

JavaFX for Embedded Powerful set of 100% Java APIs FXML for UI markup & Visual Editor Rich graphics and animation Swing integration Integrated Web content Available on Windows, MAC OSX, Linux/x86 /ARM

The Raspberry Pi is a credit-card-sized single -board computer developed in the UK by th e Raspberry Pi Foundation

Specification Model A Model B SoC CPU Broadcom BCM2835 (CPU, GPU, DSP, SDRAM, and single USB port) 700 MHz ARM1176JZF-S core (ARM11 family) Memory(SDRAM) 256MB (Shared with GPU) 512MB (Shared with GPU USB 2.0 Ports Video Output Audio Output Onboard Storage 1 (direct from BCM2835 chip) 2 (via the built in integrated 3-port USB hu b) HDMI, Composite HDMI, Stereo SD/MMC/SDIO card slot Onboard Network None 10/100 Ethernet Power 5V Micro USB Price US $25 US $35

ARM Features 32-bit RISC Architecture ARM accounts for 75% of embedded 32-bit CPUs today 8 billion chips sold last year, more than 30 billion in total Zero manufactured by ARM Abstract architecture and microprocessor core designs Raspberry Pi uses an ARM11 with ARMv6 instruction set Low power consumption Good for mobile devices Raspberry Pi can be powered from 700mA 5V only PSU Raspberry Pi does not require heatsink of fan

Office HTPC Robot Remote Control Sound Digital Photo Frame Home Gateway 3D Graphic Quadcopter Media Streaming Cloud Storage Multimedia Game Printer Server Sensor Device Animation Programming M2 M Blackbox CCTV Control Web Server

Performing the Essential Linux Setup Download the Raspbian "Wheezy" Linux distribution for the Raspberry Pi Copy the Raspbian Wheezy image to SD card Resize the SD card partitions Perform the first boot

Performing the Essential Linux Setup

Performing the Essential Linux Setup

Performing the Java SE for Embedded Devices Setup Acquire the Java SE for Embedded Devices evaluation software Unpack the Java download Launch Java Performing Optional Linux Tuning and Tweaking

Optional Linux Tuning and Tweaking Set up a static IP address Enable swapping and optimize file system access Automatically start the graphical user interface Set up time zone and locale Set up a time server Set up an internet proxy Update the Linux package Remap the keyboard Enable sound

JavaFX on Raspberry Pi 제 13 회한국자바개발자컨퍼런스

Apache Tomcat on Raspberry Pi 제 13 회한국자바개발자컨퍼런스

How to Develop Java Application on Raspberry Pi 제 13 회한국자바개발자컨퍼런스

Displaying HTML in JavaFX 제 13 회한국자바개발자컨퍼런스

Displaying HTML in JavaFX public class Main extends Application { public static void main(string[] args) { Launcher.launch(Main.class, args); } @Override public void start(stage stage) { WebEngine eng = new WebEngine("http://google.com"); WebView webview = new WebView(eng); Scene scene = new Scene(webView); stage.setscene(scene); stage.settitle("web Test"); stage.setvisible(true); }}

Hello World in JavaFX public class JavaFXExample extends Application { @Override public void start(stage stage) { Scene scene = new Scene( LabelBuilder.create().text("Hello World!").layoutX(25).build()); stage.settitle("welcome to JavaFX!"); stage.setscene(scene); stage.show(); } public static void main(string[] args) { launch(args); } }

Calling JavaScript from JavaFX String script = "alert('we've got a message, Houston!'); ; eng.executescript(script);

Using Java on the Raspberry Pi

Using Java on the Raspberry Pi Sound UIs, JavaFX Serial (TTL UART) USB GPIO/SPI/I2C

Make A Noise with Java Sound drivers now included in new distros Java Sound API Remember to add audio to user s groups modprobe snd_pcm_oss (creates /dev/dsp, needed by MIDI interface) Some bits work, others not so much Playing (the right format) WAV file works MIDI seems unbelievably slow FreeTTS text-to-speech Some bits working (limited domain voice)

JavaFX on the Raspberry Pi Work involves optimal implementation of Prism graphic engine Configure with Djavafx.platform x11 (X11, software rendering) directfb (Not currently working due to need for 16/32 DirectFB) fb (Framebuffer with soft rendering) eglfb (OpenGL rendering to framebuffer)

Using The Serial Port UART provides TTL level signals (3.3V) RS-232 uses 12V signals Use MAX3232 chip to convert Use this for access to serial console Turn off serial console: Edit /etc/inittab Edit /boot/cmdline.txt Comment out /dev/ttyama0 lines

USB Peripherals Universal Serial Bus (But not as simple as serial) Easy devices are ones that appear as simple serial devices /dev/ttyusb0 More complex devices need native code and libusb apt-get install libusb-1.0-0-dev

Java and Serial Port/USB Serial Device JavaComm API Install RXTX package apt-get install librxtx-java How to solve the /dev/ttys* only problem System.setProperty ( gnu.io.rxtx.serialports, /dev/ttyusb0 );

public class TwoWaySerialComm { void connect(string portname) throws Exception { CommPortIdentifier portidentifier = CommPortIdentifier.getPortIdentifier(portName); if (portidentifier.iscurrentlyowned()) { System.out.println("Error: Port is currently in use ); } else { int timeout = 2000; CommPort commport = portidentifier.open(this.getclass().getname(), timeout); if (commport instanceof SerialPort) { SerialPort serialport = (SerialPort)commPort; serialport.setserialportparams(57600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); InputStream in = serialport.getinputstream(); OutputStream out = serialport.getoutputstream(); (new Thread(new SerialReader(in))).start(); (new Thread(new SerialWriter(out))).start(); } else { System.out.println("Error: Only serial ports are handled by this example. ); } } }

public static class SerialReader implements Runnable { InputStream in; public SerialReader( InputStream in ) { this.in = in; } } public void run() { byte[] buffer = new byte[ 1024 ]; int len = -1; try { while( ( len = this.in.read( buffer ) )!= -1 ) { System.out.print( new String( buffer, 0, len ) ); } } catch( IOException e ) { e.printstacktrace(); } }

public static class SerialWriter implements Runnable { OutputStream out; public SerialWriter( OutputStream out ) { } this.out = out; } public void run() { try { int c = 0; while( ( c = System.in.read() )!= -1 ) { this.out.write( c ); } } catch( IOException e ) { e.printstacktrace(); } }

The OWI Robot Arm Cheap and Cheerful Comes with USB interface Use native code for control and JNI Simple control protocol 3bytes (1 = arm, 2 = base, 3 = light) Combining movements requires some bit twiddling Can only stop all motors, not individually

Robot Arm Control JNI Code Native C functions Initialization of arm using libusb and appropriate device Separate function for each control element Compile to shared library Use JNI to generate header file appropriate to Java code usage e.g. native int arm_usb_init() Compile to shared library JNI is not easy to reuse

Robot Arm Control Java Code Java code is simple Calibration required to determine time for specific movement arm_gripper_move(open); usleep(500); arm_gripper_move(stop); usleep(500); arm_gripper_move(close); usleep(500); arm_gripper_move(stop);

Gamepad Controller Manual dexterity Linux supports most of these out of the box Drivers create entries in /dev/input Java API through JInput Mature technology (not been touched since 2003) Recompile code on RasPi Needed to tweak build script for incomplete classpath Devices do not have general read/write access

Gamepad Controller Code Wrote library on top of Jinput Jinput to generic, needed code to be more specific to gamepad GamePadController gpc = new GamePadController(); gpc.addbuttonlistener(gamepadcontroller.button_1, this); gpc.addjoysticklistener(gamepadcontroller.joystick_left, this); new Thread(gpc).start();

Gamepad Controller Code public void buttonaction(buttonevent be) { if (be.getid() == GamePadController.BUTTON_1) robotarm.setgripperlight(true);... } public void joystickaction(joystickevent jse) { if (jse.getid() == GamePadController.JOYSTICK_LEFT){ if ((position & JoystickEvent.POSITION_LEFT)!= 0) robotarm.moveelbow(armcontroller.up); }... }

How to Use SPI and I2C Even more complex peripherals Drivers still experimental Devices for SPI /dev/spidev-0.0 and /dev/spidev-0.1 Devices for I2C Run i2c-dev /dev/i2c-0 Not yet tried these with Java (Screen and JavaFX project next)

Conclusions Raspberry Pi is a very cool (and cheap) computer Great for teaching Great introduction to ARM Java works well and will get better Opportunities are limitless!

Further Information http://java.oracle.com http://www.oracle.com/technetwork/java/embedded http://www.raspberrypi.org Raspberry Pi User Guide Eben Upton, Gareth Halfacree