Top Banner

of 30

ProgrammingTheRealWorld

May 30, 2018

Download

Documents

pauldeng
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/14/2019 ProgrammingTheRealWorld

    1/30

    Programming the Real-world

    Introduction to SPOT

    Peng Deng

    CSSE University of MelbourneLabSUM

  • 8/14/2019 ProgrammingTheRealWorld

    2/30

    2

    Agenda Introduction

    Evolution of Computing

    WSN

    Sun SPOT What is SPOT Hardware and Software Applications

    My Projects Game Panel Virtual Controller

    Gesture Recognition

    Simple Tutorial

    Conclusion

  • 8/14/2019 ProgrammingTheRealWorld

    3/30

    3

    Evolution of Computing

    1

    1960s: Mainframe Era

    One computer per many users.

    2

    1980s: Personal Computer Era

    One computer per user.

    [1]

  • 8/14/2019 ProgrammingTheRealWorld

    4/30

    4

    Evolution of Computing [cont.]

    2

    1980s: Personal Computer Era

    One computer per user.

    3

    2000s: Mobility Era

    Several computers per user.

  • 8/14/2019 ProgrammingTheRealWorld

    5/30

    5

    Evolution of Computing [cont.]

    3

    2000s: Mobility Era

    Several computers per user.

    What comes

    NEXT?

  • 8/14/2019 ProgrammingTheRealWorld

    6/30

    6

    Evolution of Computing [cont.]

    3

    2000s: Mobility Era

    Several computers per user.

    4

    2020 and beyond: Ubiquity Era

    Thousands of computers per user.

  • 8/14/2019 ProgrammingTheRealWorld

    7/30

    7

    Ubiquitous Computing Or pervasive computing, ambient intelligence, everyware, physical

    computing, the Internet of Things, haptic computing

    Characteristics embedded

    context aware personalized

    adaptive

    anticipatory

    Wireless Sensor Network is one candidate

    [2][3][4]

  • 8/14/2019 ProgrammingTheRealWorld

    8/30

    8

    Wireless Sensor Network Small-scale sensor nodes

    Wireless communication

    Large scale of deployment Unattended operation

    Environmental monitoring

    Security

    Defence

    Bioinformatics and health

    Transportation management

    Chemical detection and emergency response

    [5][6]

  • 8/14/2019 ProgrammingTheRealWorld

    9/30

    9

    The Timeline of WSN

    Microsoft: Smart Personal Objects TechnologySun: Small Programmable Object Technology

  • 8/14/2019 ProgrammingTheRealWorld

    10/30

    10

    What is Sun SPOT Embedded Development Platform Flexible hardware and software

    Easy to program Java top to bottom

    User programs the device entirely in Java

    Using standard Java tools

    Connected Wireless Communication

    Mesh networking

    Over the Air Programming

    Mobile

    Built in battery charged through USB

    Aware and Active Able to sense and affect surroundings

    Secure

    Built-in asymmetric cryptography

    Open Source Software -- Hardware

    [7][8]

  • 8/14/2019 ProgrammingTheRealWorld

    11/30

    11

    Sun SPOT HardwareAntenna

    2.4 GHz IEEE802.15.4 Radio

    Module

    180 MHz 32 bit

    ARM920T core512K RAM4M Flash

    Daughter boardconnector

    Power switch

    USB interface

    withmini-B connector

    [7][8]

  • 8/14/2019 ProgrammingTheRealWorld

    12/30

    12

    Sun SPOT Hardware [cont.]8 3-colors LEDs Switches

    Light sensor 3-D

    Accelerometer

    Analog in 4-5

    Replicated switches "High" current outputsDigital I/O

    Digital I/O 0-3 Analog inputs

    Temperaturesensor and

    A/D converter

  • 8/14/2019 ProgrammingTheRealWorld

    13/30

    13

    Sun SPOT Software Squawk Virtual Machine

    J2ME CLDC 1.1 (cellphone without display)

    Runs on bare metal (No OS)

    Designed for memory constrained devices

    Runs multiple applications (concurrently)

    IDE Supported NetBeans, Eclipse, any IDE you familiar with

    [9]

  • 8/14/2019 ProgrammingTheRealWorld

    14/30

    14

    Applications[7]

  • 8/14/2019 ProgrammingTheRealWorld

    15/30

    15

    ApplicationsAutonomous Deployment [7]

  • 8/14/2019 ProgrammingTheRealWorld

    16/30

    16

    ApplicationsRobot [7]

    Video: http://www.youtube.com/watch?v=aJRp6h9SXNo

  • 8/14/2019 ProgrammingTheRealWorld

    17/30

    17

    ApplicationsSwarms

    Autonomous Light Air VesselsCell phone vibration motor to propel

    Roam around to find friend or seek food

    Spinning together

    Feed them

    Video: http://www.youtube.com/watch?v=uMdACfIMoEY

    [11]

  • 8/14/2019 ProgrammingTheRealWorld

    18/30

    18

    ApplicationsMikes Flying Bike

    Flying and Exercise!

    Sun SPOT + Google Earth Flight Simulator

    Video: http://www.youtube.com/watch?v=k3QK1eu3q3E

    [12]

  • 8/14/2019 ProgrammingTheRealWorld

    19/30

    19

    ApplicationsSPOTkin

    Sun SPOT + Pumpkin?

    Video: http://www.youtube.com/watch?v=08S_89T-LFo

  • 8/14/2019 ProgrammingTheRealWorld

    20/30

    20

    My ProjectsGame Panel

    Sun SPOT + Never Ball

    Video: http://www.youtube.com/watch?v=4-1yBd5gbzU

  • 8/14/2019 ProgrammingTheRealWorld

    21/30

    21

    My ProjectsVirtual Earth Controller

    Sun SPOT + NASA World Wind

    The earth is on your palm

    Video: http://www.youtube.com/watch?v=ICEygWw80V0

  • 8/14/2019 ProgrammingTheRealWorld

    22/30

    22

    My ProjectsGesture Recognition

    Facts:

    1.Multi-attributes; 2. Data stream

    Challenges:1.Recognition; 2. Segmentation

    Solutions:

    1.Machine Learning; 2. Threshold+std dev

    Accuracy: 17% ~ 97%

  • 8/14/2019 ProgrammingTheRealWorld

    23/30

    23

    Simple TutorialGet Data From Sun SPOT

    Sun SPOTSun SPOT

    Sun SPOTBase Station

    Sun SPOTBase Station

    PC(Processing)

    PC

    (Processing)

  • 8/14/2019 ProgrammingTheRealWorld

    24/30

    24

    Simple Tutorial [cont.]Get Data From Sun SPOT

    Sensor Side App:

    private IAccelerometer3D accel = EDemoBoard.getInstance().getAccelerometer();private ITemperatureInput tempSensor = EDemoBoard.getInstance().getADCTemperature();private ILightSensor lightSensor= EDemoBoard.getInstance().getLightSensor();

    String msg = String.valueOf(accel.getAccelX())+";"+

    String.valueOf(accel.getAccelY())+";"+String.valueOf(accel.getAccelZ())+";"+String.valueOf(tempSensor.getCelsius())+";"+String.valueOf(lightSensor.getValue());

    RadiogramConnection conn =(RadiogramConnection)Connector.open("radiogram://0014.4F01.0000.1455:100");Datagram dg = conn.newDatagram(conn.getMaximumLength());dg.writeUTF(msg);conn.send(dg);conn.close();

    9 lines of code!

  • 8/14/2019 ProgrammingTheRealWorld

    25/30

    25

    Simple Tutorial [cont.]Get Data From Sun SPOT

    Host Side App:

    RadiogramConnection conn = (RadiogramConnection) Connector.open("radiogram://:100");Datagram dg = conn.newDatagram(conn.getMaximumLength());conn.receive(dg);

    String rawData = dg.readUTF();

    System.out.println(rawData);conn.close();

    DONE!

    6 lines of code!

  • 8/14/2019 ProgrammingTheRealWorld

    26/30

    26

    Conclusion Usage

    Rapid prototype development

    Experiment

    Education

    Not ready for commercial deployment Lacks support Constraints

    Future development Get support from sensor providers like J2ME supported by

    mobile phone companies

  • 8/14/2019 ProgrammingTheRealWorld

    27/30

  • 8/14/2019 ProgrammingTheRealWorld

    28/30

    28

    Appreciate

    Dr. Lars Kulik (http://www.csse.unimelb.edu.au/~lars/)

    Dr. Egemen Tanin (http://www.csse.unimelb.edu.au/~egemen/)

    All members in SUM Research Lab (http://www.sumlab.net/)

  • 8/14/2019 ProgrammingTheRealWorld

    29/30

  • 8/14/2019 ProgrammingTheRealWorld

    30/30

    30

    Peng Deng

    Research Assistant

    SUM Research Lab

    CSSE University of Melbourne

    Thank you

    August 22, 2008