programming the real world
DESCRIPTION
TRANSCRIPT
Programming the Real-world
Introduction to SPOT
Peng Deng
CSSE University of MelbourneLabSUM∑
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
3
Evolution of Computing
1
1960s: Mainframe Era
One computer per many users.
2
1980s: Personal Computer Era
One computer per user.
4
Evolution of Computing [cont.]
2
1980s: Personal Computer Era
One computer per user.
3
2000s: Mobility Era
Several computers per user.
5
Evolution of Computing [cont.]
3
2000s: Mobility Era
Several computers per user.
What comes
NEXT?
6
Evolution of Computing [cont.]
3
2000s: Mobility Era
Several computers per user.
4
2020 and beyond: Ubiquity Era
Thousands of computers per user.
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
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
9
The Timeline of WSN
Microsoft: Smart Personal Objects TechnologySun: Small Programmable Object Technology
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
11
Sun SPOT Hardware
Antenna
2.4 GHz IEEE 802.15.4 Radio Module
180 MHz 32 bit
ARM920T core512K RAM4M Flash
Daughter board connector
Power switch
USB interface with mini-B connector
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
Temperature sensor andA/D converter
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
14
Applications
15
ApplicationsAutonomous Deployment
16
ApplicationsRobot
17
ApplicationsSwarms
Autonomous Light Air Vessels•Cell phone vibration motor to propel
•Roam around to find friend or seek food
•Spinning together
•Feed them
18
ApplicationsMike’s Flying Bike
Flying and Exercise!
Sun SPOT + Google Earth Flight Simulator
19
ApplicationsSPOTkin
Sun SPOT + Pumpkin?
20
My ProjectsGame Panel
Sun SPOT + Never Ball
21
My ProjectsVirtual Earth Controller
Sun SPOT + NASA World Wind
The earth is on your palm
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%
23
Simple TutorialGet Data From Sun SPOT
Sun SPOTSun SPOT
Sun SPOTBase StationSun SPOT
Base Station
PC(Processing)
PC(Processing)
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!
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!
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– …
Q & A
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/)
29
Peng DengResearch Assistant
SUM Research LabCSSE University of Melbourne
Thank you
August 20, 2008