project #2 mobile multiplayer game: tic-tac-toe project #3 tinyos sensing application ee194wir matt...

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

Upload: clifton-mason

Post on 28-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

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

Project #3TinyOS Sensing Application

EE194WIR

Matt Magpayo

[email protected]

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

ImplementationImplementation• Midlet formatMidlet format

• Game loopGame loop

• SMS MessagehandlerSMS Messagehandler

ScreenshotsScreenshots

Screenshots (cont.)Screenshots (cont.)

Screenshots (cont.)Screenshots (cont.)

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

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)

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.

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.

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

Serial ForwarderSerial Forwarder

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

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)

QuestionsQuestions??