100% found this document useful (1 vote)
211 views30 pages

Programming The Real-World: Introduction To SPOT

This document introduces the Sun SPOT platform for programming wireless sensor networks. It discusses the evolution of computing towards ubiquitous and pervasive systems using many small, embedded, wireless devices. The Sun SPOT is presented as an example platform, with details on its hardware, software, and programming model. Several example applications are shown, including robotics, swarm robotics, and gesture recognition. Finally, a simple tutorial demonstrates how to retrieve sensor data from a Sun SPOT device using only a few lines of code.

Uploaded by

pauldeng
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
211 views30 pages

Programming The Real-World: Introduction To SPOT

This document introduces the Sun SPOT platform for programming wireless sensor networks. It discusses the evolution of computing towards ubiquitous and pervasive systems using many small, embedded, wireless devices. The Sun SPOT is presented as an example platform, with details on its hardware, software, and programming model. Several example applications are shown, including robotics, swarm robotics, and gesture recognition. Finally, a simple tutorial demonstrates how to retrieve sensor data from a Sun SPOT device using only a few lines of code.

Uploaded by

pauldeng
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Programming the Real-world

Introduction to SPOT

Peng Deng

∑ SUMLab
CSSE University of Melbourne
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

2
Evolution of Computing [1]

1 2

1960s: Mainframe Era 1980s: Personal Computer Era


One computer per many users. One computer per user.

3
Evolution of Computing [cont.]

2 3

1980s: Personal Computer Era 2000s: Mobility Era


One computer per user. Several computers per user.

4
Evolution of Computing [cont.]

What comes
NEXT?
2000s: Mobility Era
Several computers per user.

5
Evolution of Computing [cont.]

3 4

2000s: Mobility Era 2020 and beyond: Ubiquity Era


Several computers per user. Thousands of computers per user.

6
Ubiquitous Computing [2][3][4]

• 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

7
Wireless Sensor Network [5][6]

• 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
8
The Timeline of WSN

Microsoft: Smart Personal Objects Technology


Sun: Small Programmable Object Technology
9
What is Sun SPOT [7][8]

• 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
10
– Software -- Hardware
Sun SPOT Hardware [7][8]

2.4 GHz IEEE


802.15.4 Radio
Antenna
Module

180 MHz 32 bit


512K RAM
ARM920T core 4M Flash

USB interface
with
Daughter board mini-B connector
connector

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

Light sensor 3-D


Accelerometer

Analog in 4-5 Temperature


sensor and
A/D converter

Digital I/O 0-3 Analog inputs

Replicated switches Digital I/O "High" current outputs

12
Sun SPOT Software [9]

• 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

13
Applications [7]

14
Applications
Autonomous Deployment [7]

15
Applications
Robot [7]

Video: http://www.youtube.com/watch?v=aJRp6h9SXNo
16
Applications
Swarms [11]

Autonomous Light Air Vessels


•Cell 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
17
Applications
Mike’s Flying Bike [12]

Flying and Exercise!

Sun SPOT + Google Earth Flight Simulator

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

Sun SPOT + Pumpkin?


Video: http://www.youtube.com/watch?v=08S_89T-LFo
19
My Projects
Game Panel

Sun SPOT + Never Ball


Video: http://www.youtube.com/watch?v=4-1yBd5gbzU
20
My Projects
Virtual Earth Controller

The earth is on your palm

Sun SPOT + NASA World Wind


Video: http://www.youtube.com/watch?v=ICEygWw80V0
21
My Projects
Gesture Recognition

Facts:
1.Multi-attributes; 2. Data stream
Challenges:
1.Recognition; 2. Segmentation
Solutions:
1.Machine Learning; 2. Threshold+std dev

Accuracy: 17% ~ 97%

22
Simple Tutorial
Get Data From Sun SPOT

PC
PC
(Processing)
(Processing)

Sun
Sun SPOT
SPOT
Base
Base Station
Station

Sun
Sun SPOT
SPOT
23
Simple Tutorial [cont.]
Get Data From Sun SPOT

Sensor Side App: 9 lines of code!

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

24
Simple Tutorial [cont.]
Get Data From Sun SPOT

Host Side App: 6 lines of code!

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!

25
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
– …
26
Q&A
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/)

28
Reference
[1] Richard Harper, Tom Rodden, Yvonne Rogers and Abigail Sellen, Being Human: Human-Computer Interaction
in the year 2020, Microsoft Research Ltd, 2008
[2] Ubiquitous computing. (2008, August 5). In Wikipedia, The Free Encyclopedia. Retrieved 01:53, August 22,
2008, from http://en.wikipedia.org/w/index.php?title=Ubiquitous_computing&oldid=230081542
[3] Ambient intelligence. (2008, July 27). In Wikipedia, The Free Encyclopedia. Retrieved 01:56, August 22, 2008,
from http://en.wikipedia.org/w/index.php?title=Ambient_intelligence&oldid=228280763
[4] Picture from movie Matrix
[5] Wireless sensor network. (2008, August 16). In Wikipedia, The Free Encyclopedia. Retrieved 01:58, August
22, 2008, from http://en.wikipedia.org/w/index.php?title=Wireless_sensor_network&oldid=232288494
[6] Pictures from David E. Culler and Hans Mulder (2004, June). Smart Sensor to Network the World. Scientific
American, 85-91.
[7] Projectsunspot, Retrieved 08:55, July 28, 2007, from http://www.flickr.com/photos/projectsunspot/
[8] Sun SPOT SDK Version Blue, Developers’ Guide
[9] Squawk homepage, Retrieved 08:50, July 28, 2007, from http://research.sun.com/projects/squawk/
[10] RENCI Takes Flight, Retrieved August 20, 2008, from http://www.renci.org/news/uav.php
[11] ALAVS, Retrieved from August 20,2008, from http://www.alavs.com/
[12] Picture from movie ET

29
Thank you

Peng Deng
Research Assistant
SUM Research Lab
CSSE University of Melbourne

August 22, 2008 30

You might also like