Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

14
Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application EE194WIR Matt Magpayo [email protected]

description

Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application. EE194WIR Matt Magpayo [email protected]. Project#2 Mobile Tic-Tac-Toe. Language: Java Emulator: Nokia S60 prototype emulator Multiple instances Nokia Connectivity Framework - PowerPoint PPT Presentation

Transcript of Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Page 1: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Project #2Mobile Multiplayer Game: Tic-Tac-Toe

Project #3TinyOS Sensing Application

EE194WIR

Matt Magpayo

[email protected]

Page 2: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Project#2 Mobile Tic-Tac-Project#2 Mobile Tic-Tac-ToeToe

• Language: JavaLanguage: Java

• Emulator: Nokia S60 Emulator: Nokia S60 prototype emulator prototype emulator – Multiple instancesMultiple instances– Nokia Connectivity FrameworkNokia Connectivity Framework

• Short Message Service (SMS) Short Message Service (SMS) communicationcommunication

Page 3: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

ImplementationImplementation• Midlet formatMidlet format

• Game loopGame loop

• SMS MessagehandlerSMS Messagehandler

Page 4: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

ScreenshotsScreenshots

Page 5: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Screenshots (cont.)Screenshots (cont.)

Page 6: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Screenshots (cont.)Screenshots (cont.)

Page 7: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Project#3 TinyOS Sensing Project#3 TinyOS Sensing ApplicationApplication

• Application: Light/Temperature Application: Light/Temperature SensingSensing

• Language = NesCLanguage = NesC

• Testing: TOSSIMTesting: TOSSIM

• GUI: TinyViz, GraphVizGUI: TinyViz, GraphViz

Page 8: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

ImplementationImplementation• Sensor nodes and 1 Base StationSensor nodes and 1 Base Station

• Sensor nodeSensor node– periodically takes light readings and sends a periodically takes light readings and sends a

group of readings over radio to base stationgroup of readings over radio to base station

• Base StationBase Station– Forwards packets through serial port to PCForwards packets through serial port to PC

• Led Module used Led Module used – yellow LED is toggled when new packet sentyellow LED is toggled when new packet sent– red LED is on when the light sensor reading is red LED is on when the light sensor reading is

above some constant value (0x0300 or 768)above some constant value (0x0300 or 768)

Page 9: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Routing SchemeRouting Scheme• Base Station simply broadcasts a beacon packet. Base Station simply broadcasts a beacon packet. • Those who hear itThose who hear it

– Set one hop neighbor as base station.Set one hop neighbor as base station.– Broadcast beacon packet.Broadcast beacon packet.

• Those who hear thatThose who hear that– Add to list of all neighbors who have path to base stationAdd to list of all neighbors who have path to base station– Broadcast beacon packet.Broadcast beacon packet.

• Etc…Tree network topology is created.Etc…Tree network topology is created.• When routing, node forwards data to random When routing, node forwards data to random

neighbor out the its list. neighbor out the its list.

Page 10: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

SimulationSimulation• TOSSIM/TinyViz TinyOS simulatorTOSSIM/TinyViz TinyOS simulator

– Normally allows simulation of only ONE type of application.Normally allows simulation of only ONE type of application.– Fix: Make code dependant upon the local address of node.Fix: Make code dependant upon the local address of node.

• IF TOS_LOCAL_ADDRESS = 0 , use base station code IF TOS_LOCAL_ADDRESS = 0 , use base station code • ELSE use sensor codeELSE use sensor code

• SerialFowarderSerialFowarder– Connects to TOSSIM Connects to TOSSIM

• MOTECOM address = tossim-serial@localhost port:0MOTECOM address = tossim-serial@localhost port:0• Listens to Node 0 (base station)Listens to Node 0 (base station)

• Oscilloscope GUIOscilloscope GUI– Extracts/Displays data received from SerialFowarder Extracts/Displays data received from SerialFowarder

packets.packets.– Allows graphing of multiple node data.Allows graphing of multiple node data.

Page 11: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

TinyVizTinyViz

• Node 0 as base Node 0 as base station.station.

• ““ADC Readings” ADC Readings” Plug-in used to Plug-in used to preset light data for preset light data for testing.testing.– Used Values 0-700Used Values 0-700

Page 12: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Serial ForwarderSerial Forwarder

• Read packets Read packets sent from Base sent from Base Station (node Station (node 0)0)

Page 13: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

Oscilloscope GUIOscilloscope GUI

• Preset ValuesPreset Values

• All motes seen All motes seen using channel 1using channel 1

• Possibility to add Possibility to add more data more data channels (ex. channels (ex. temp)temp)

Page 14: Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application

QuestionsQuestions??