MUC Coursework - PowerPoint PPT Presentation

About This Presentation
Title:

MUC Coursework

Description:

MUC Coursework Deadline: 16 April Add all files to a folder, and send a compressed version of the folder (.zip or .tar) to niki_at_dcs.bbk.ac.uk by 26 March – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 8
Provided by: acuk
Category:
Tags: muc | coursework

less

Transcript and Presenter's Notes

Title: MUC Coursework


1
MUC Coursework
  • Deadline 16 April
  • Add all files to a folder, and send a compressed
    version of the folder (.zip or .tar) to
    niki_at_dcs.bbk.ac.uk by 26 March
  • The compressed version should be named as
    follows Name_Surname.zip or Name_Surname.tar
  • Add any comments about your coursework (brief
    description of files, problems encountered, etc.)
    into a file called intro.txt

2
Coursework (1/2)
  • Problem
  • 2n1 nodes, one gateway (with an ID of 0), n
    nodes with odd IDs, n nodes with even IDs
  • Nodes with odd IDs collect light readings, those
    with even IDs collect temperature readings
  • At every period
  • the gateway asks the readings of the 2n nodes
  • the nodes collect the readings and send them back
    to the gateway
  • the gateway computes the average light and
    temperature

3
Coursework (2/2)
  • The gateway
  • Computes the average light and temperature at the
    beginning of each period (of five seconds)
  • Sends the average light and temperature in a
    single packet to the UART
  • The other nodes
  • Send their readings after a random interval, so
    that the messages from different nodes are not
    sent at the same time

4
Design
  • The gateway
  • has a PeriodTimer
  • sends BroadcastMsg
  • receives LightMsg and TempMsg
  • sends UartMsg
  • The other nodes
  • have a Light or Temp sensor
  • receive BroadcastMsg
  • have a DelayTimer
  • send LightMsg or TempMsg

5
Architecture
CourseworkC
CourseworkM
Makefile
StdControl
Timer
Leds
SendMsg
ADC
ReceiveMsg
Random
LedsC
TimerC
RandomLFSR
DemoSensorC
Temp
GenericComm
Main
6
Hints (1/2)
  • if (TOS_LOCAL_ADDRESS20) / even node /
    else / odd node /
  • You cannot pass parameters to tasks, you need to
    use global variables
  • Write a specific task for each message to send
  • You can send to the serial port using
    TOS_UART_ADDRESS (and you can see those messages
    using export DBGuart)

7
Hints (2/2)
  • The gateway needs four variables to compute the
    averages
  • sumLight
  • numberLight
  • sumTemp
  • numberTemp
  • The nodes need only one variable
  • lightValue or tempValue
Write a Comment
User Comments (0)
About PowerShow.com